42 typedef struct _range_list_element
51 typedef struct _range_list
54 uint32_t elem_alloced;
int32_t range_list_find(const range_list *rl, uint32_t offset)
Attempts to find the unique element whose range encompasses offset.
Definition: range_list.c:253
uint32_t range_list_size(const range_list *rl)
Query the current number of elements on a range_list.
Definition: range_list.c:154
void range_list_free(range_list *rl)
Frees the memory associated with a range_list, including the elements, but not any data parameters re...
Definition: range_list.c:147
bool range_list_add(range_list *rl, uint32_t offset, uint32_t length, void *data)
Adds an element to the range_list.
Definition: range_list.c:161
void * range_list_find_data(const range_list *rl, uint32_t offset)
Same as range_list_find(), but returns the data associated with an element.
Definition: range_list.c:275
const range_list_element * range_list_get(const range_list *rl, uint32_t index)
Retrieves the element for a given index.
Definition: range_list.c:244
bool range_list_remove(range_list *rl, uint32_t index)
Removes an element from the list.
Definition: range_list.c:212
bool range_list_split_element(range_list *rl, uint32_t index, uint32_t offset)
Splits an existing element into two elements in place.
Definition: range_list.c:285
range_list * range_list_new()
Allocates a new range_list.
Definition: range_list.c:125
bool range_list_has_range(range_list *rl, uint32_t start, uint32_t length)
Determines whether or not a specified range exists contiguously within the range_list.
Definition: range_list.c:318
Definition: range_list.h:43
XXX: document this.
Definition: range_list.h:52