MMgr v2.3.0
Zero-heap memory manager in C11. One borrowed buffer, carved by asserted offset.
Loading...
Searching...
No Matches

The record of one vector, which its token names. More...

#include <memoria_vector.h>

Data Fields

embed_atomic_usize count
embed_atomic_uptr cell
embed_atomic_usize capacity
const size_t stride
const size_t limit
const CellOwner *const *const owner
embed_atomic_usize *const claimed

Detailed Description

The record of one vector, which its token names.

Note
The library's storage, positioned at compile time by MemoriaVector. Each member is MMgr's to write, and the caller reads none of them. The token is a const pointer to the record. It does not change while the program runs, however often a growth or a move puts the elements in another place.
count is the word that a push and a pop change, each with one CAS. cell is the identity of the movable cell, as an integer, and 0 before the first push. capacity is the elements that the cell holds.
claimed holds one bit an element. A call holds the bit of each element that it reads or writes, and so no two calls reach one element at once.

Definition at line 75 of file memoria_vector.h.

Field Documentation

◆ count

embed_atomic_usize VectorRecord::count

Elements in the vector.

Definition at line 77 of file memoria_vector.h.

◆ cell

embed_atomic_uptr VectorRecord::cell

Identity of the movable cell of the elements, 0 where none.

Definition at line 78 of file memoria_vector.h.

◆ capacity

embed_atomic_usize VectorRecord::capacity

Elements that the cell holds.

Definition at line 79 of file memoria_vector.h.

◆ stride

const size_t VectorRecord::stride

Bytes of one element.

Definition at line 80 of file memoria_vector.h.

◆ limit

const size_t VectorRecord::limit

The ceiling of the capacity, which the claim bits cover.

Definition at line 81 of file memoria_vector.h.

◆ owner

const CellOwner* const* const VectorRecord::owner

The owner that counts the cell [BORROWS].

Definition at line 82 of file memoria_vector.h.

◆ claimed

embed_atomic_usize* const VectorRecord::claimed

One claim bit an element, in whole words [BORROWS].

Definition at line 83 of file memoria_vector.h.


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