op_sar_bitrange_destroy()
Abstract
Deallocates memory associated with a bit-range.
Syntax
op_sar_bitrange_destroy (bit_range)
| Argument | Type | Description |
|---|---|---|
bit_range |
Sar_Bitrange* |
bit-range to be destroyed |
Return Type
void
No return value.
Example
/* loop through a bitrange list and destroy all bitranges. */
while (op_prg_list_size (bitrange_list_ptr) != 0)
{
bitrange_ptr = (Sar_Bitrange *) op_prg_list_remove(bitrange_list_ptr,
OPC_LISTPOS_HEAD);
op_sar_bitrange_destroy (bitrange_ptr);
}
Details
After a bit-range is no longer needed, the memory associated with it should be deallocated so that memory does not run out, thereby causing a program abort.
Purpose
Provides a mechanism to destroy bit-ranges.
Errors
- Recoverable Error: Sar_Bitrange is invalid.
Reference
- Use the KP op_sar_bitrange_create() to create new bit-ranges
- Use the KP op_sar_bitrange_info_get() to read information contained in a bit-range
- Use the KP op_sar_seg_bitrange_list_get() to get a list of bit-ranges inside a segment