MMgr v1.0.0
Zero-heap memory manager in C11. One borrowed buffer, carved by asserted offset.
Loading...
Searching...
No Matches
AnularisCfg Struct Reference

Arguments for every mmgr_anular_ entry, each reading only the members it needs. More...

#include <memoria_anularis.h>

Data Fields

mmgr_ring *const ring
uint8_t *const buf
const size_t capacity
const size_t segment_count
const size_t segment_bytes
uint8_t *const dst
const uint8_t *const src
const size_t bytes
const size_t offset
const size_t index
const embed_word mask
size_t *const out_index

Detailed Description

Arguments for every mmgr_anular_ entry, each reading only the members it needs.

Note
Every entry but mmgr_anular_loculus_next reads ring. mmgr_anular_init reads buf, capacity, segment_count and segment_bytes on top of it.
Members left unset are zero, and the entries that ignore them never read them.

Definition at line 154 of file memoria_anularis.h.

Field Documentation

◆ ring

mmgr_ring* const AnularisCfg::ring

Ring to act on [BORROWS].

Definition at line 156 of file memoria_anularis.h.

◆ buf

uint8_t* const AnularisCfg::buf

Ring bytes, taken by mmgr_anular_init [BORROWS].

Definition at line 157 of file memoria_anularis.h.

◆ capacity

const size_t AnularisCfg::capacity

Bytes at buf, non-zero, a power of two where segment_bytes is unset.

Definition at line 158 of file memoria_anularis.h.

◆ segment_count

const size_t AnularisCfg::segment_count

Segments to divide the ring into, a power of two no larger than capacity.

Definition at line 159 of file memoria_anularis.h.

◆ segment_bytes

const size_t AnularisCfg::segment_bytes

Bytes per segment where set, else capacity divided by segment_count.

Definition at line 160 of file memoria_anularis.h.

◆ dst

uint8_t* const AnularisCfg::dst

Destination for read, read_byte and peek [BORROWS].

Definition at line 161 of file memoria_anularis.h.

◆ src

const uint8_t* const AnularisCfg::src

Bytes put writes, or the region loculus_hold records [BORROWS].

Definition at line 162 of file memoria_anularis.h.

◆ bytes

const size_t AnularisCfg::bytes

Byte count the call moves or records.

Definition at line 163 of file memoria_anularis.h.

◆ offset

const size_t AnularisCfg::offset

Offset ahead of the tail that peek starts at.

Definition at line 164 of file memoria_anularis.h.

◆ index

const size_t AnularisCfg::index

Loculus or segment the call acts on.

Definition at line 165 of file memoria_anularis.h.

◆ mask

const embed_word AnularisCfg::mask

Mask loculus_next picks the lowest set bit of.

Definition at line 166 of file memoria_anularis.h.

◆ out_index

size_t* const AnularisCfg::out_index

Segment index seg_next and seg_front write into [BORROWS].

Definition at line 167 of file memoria_anularis.h.


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