Serene Runtime 1.0.0-dev
C runtime for the Serene programming language
Loading...
Searching...
No Matches
array_list_t Struct Reference

#include <array_list.h>

Collaboration diagram for array_list_t:
[legend]

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_troot
 NULL means “all data is in tail”
array_list_elem_ttail
 small tail array for fast push/pop.
const srn_context_tctx
 The context that owns every allocation the array list retains.

Detailed Description

Definition at line 162 of file array_list.h.

Field Documentation

◆ ctx

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.

◆ depth

uint8_t array_list_t::depth

tree depth in levels (0 == leaf level)

Definition at line 172 of file array_list.h.

◆ ERROR_HEADER

array_list_t::ERROR_HEADER

Definition at line 163 of file array_list.h.

◆ len

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.

◆ root

array_list_node_t* array_list_t::root

NULL means “all data is in tail”

Definition at line 174 of file array_list.h.

◆ tail

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.

◆ tail_len

uint16_t array_list_t::tail_len

0..AL_BR

Definition at line 170 of file array_list.h.


The documentation for this struct was generated from the following file: