|
Serene Runtime 1.0.0-dev
C runtime for the Serene programming language
|
#include <array_list.h>
Data Fields | |
| ERROR_HEADER | |
| size_t | len |
| logical length. | |
| uint16_t | tail_len |
| 0..AL_BR | |
| uint8_t | depth |
| tree depth in levels (0 == leaf level) | |
| array_list_node_t * | root |
| NULL means “all data is in tail” | |
| array_list_elem_t * | tail |
| small tail array for fast push/pop. | |
| const srn_context_t * | ctx |
| The context that owns every allocation the array list retains. | |
Definition at line 162 of file array_list.h.
| const srn_context_t* array_list_t::ctx |
The context that owns every allocation the array list retains.
array_list_empty sets it. Pushes allocate new tail pages, leaves, and inner nodes in this context's block chain. Elements are stored as is; the caller must allocate them with a lifetime at least as long as this context.
Definition at line 183 of file array_list.h.
| uint8_t array_list_t::depth |
tree depth in levels (0 == leaf level)
Definition at line 172 of file array_list.h.
| array_list_t::ERROR_HEADER |
Definition at line 163 of file array_list.h.
| size_t array_list_t::len |
logical length.
While techically this implementation will support up to 2^85 elements in each array_list, but we will limit it down to (2^64-1)(UINT64_MAX)(on 64bit machines) in order to keep the array_list_t as small as possible
Definition at line 168 of file array_list.h.
| array_list_node_t* array_list_t::root |
NULL means “all data is in tail”
Definition at line 174 of file array_list.h.
| array_list_elem_t* array_list_t::tail |
small tail array for fast push/pop.
We allocate this in heap with SEQ_BR size and move it later to the inner Nodes.
Definition at line 177 of file array_list.h.
| uint16_t array_list_t::tail_len |
0..AL_BR
Definition at line 170 of file array_list.h.