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

The minimum security guard over one cellblock: a released cell keeps whatever is in it. More...

#include <locus_carcerum.h>

Data Fields

void *(*) persistent_buf_alloc (size_t size, const CellOwner *owner)
void(*) persistent_buf_release (void *prisoner, const CellOwner *owner)
void *(*) temporary_buf_alloc (size_t size, const CellOwner *owner)
embed_bool(*) who_owns_buf (const void *at)
size_t(*) buf_available (void)
void *(*) buf_grow (void *prisoner, size_t size, const CellOwner *owner)
embed_bool(*) movable_init (const CarcerMovableInitCfg *args)
const CarcerMovableEntry *(*) movable_buf_alloc (size_t size, const CellOwner *owner)
embed_bool(*) movable_buf_release (const CarcerMovableEntry *cell, const CellOwner *owner)
embed_bool(*) movable_buf_read (const CarcerMovableCfg *args)
embed_bool(*) movable_buf_write (const CarcerMovableCfg *args)
embed_iword(*) movable_buf_compare (const CarcerMovableCfg *args)
size_t(*) movable_buf_measure (const CarcerMovableCfg *args)

Detailed Description

The minimum security guard over one cellblock: a released cell keeps whatever is in it.

Note
EMBED_TABLE_LAYOUT asserts the thirteen members sit at consecutive EMBED_FUNCTION_POINTER_BYTES offsets, with nothing else.
Every entry is bound to the cellblock its declaration named. No call carries a cellblock argument and there is nothing to pass wrongly. A cellblock at this level has no zeroing release. The difference between the two levels is what exists, not what a caller remembers to reach for.
A cell of either tier is given back the same way, through persistent_buf_release, which reads the tier off the cell's offset.

Definition at line 593 of file locus_carcerum.h.

Field Documentation

◆ persistent_buf_alloc

void *(*) MinimumSecurityGuard::persistent_buf_alloc(size_t size, const CellOwner *owner)

Takes size bytes from the bottom for owner, unzeroed [RETURNS OWNERSHIP].

Definition at line 595 of file locus_carcerum.h.

◆ persistent_buf_release

void(*) MinimumSecurityGuard::persistent_buf_release(void *prisoner, const CellOwner *owner)

Releases owner's prisoner of either tier, cell left as it is [TAKES OWNERSHIP].

Definition at line 598 of file locus_carcerum.h.

◆ temporary_buf_alloc

void *(*) MinimumSecurityGuard::temporary_buf_alloc(size_t size, const CellOwner *owner)

Takes size bytes from the top for owner, unzeroed [RETURNS OWNERSHIP].

Definition at line 601 of file locus_carcerum.h.

◆ who_owns_buf

embed_bool(*) MinimumSecurityGuard::who_owns_buf(const void *at)

Whether at lies in this cellblock's bytes [BORROWS].

Definition at line 604 of file locus_carcerum.h.

◆ buf_available

size_t(*) MinimumSecurityGuard::buf_available(void)

Bytes between the two tiers.

Definition at line 605 of file locus_carcerum.h.

◆ buf_grow

void *(*) MinimumSecurityGuard::buf_grow(void *prisoner, size_t size, const CellOwner *owner)

Grows the newest cell of its tier to size bytes in place, unzeroed.

Definition at line 606 of file locus_carcerum.h.

◆ movable_init

embed_bool(*) MinimumSecurityGuard::movable_init(const CarcerMovableInitCfg *args)

Assigns the movable option, once.

Definition at line 609 of file locus_carcerum.h.

◆ movable_buf_alloc

const CarcerMovableEntry *(*) MinimumSecurityGuard::movable_buf_alloc(size_t size, const CellOwner *owner)

Takes a cell a move may move: its identity, NULL where refused.

Definition at line 610 of file locus_carcerum.h.

◆ movable_buf_release

embed_bool(*) MinimumSecurityGuard::movable_buf_release(const CarcerMovableEntry *cell, const CellOwner *owner)

Releases owner's movable cell, left as it is.

Definition at line 612 of file locus_carcerum.h.

◆ movable_buf_read

embed_bool(*) MinimumSecurityGuard::movable_buf_read(const CarcerMovableCfg *args)

Copies out of a movable cell.

Definition at line 614 of file locus_carcerum.h.

◆ movable_buf_write

embed_bool(*) MinimumSecurityGuard::movable_buf_write(const CarcerMovableCfg *args)

Copies into a movable cell.

Definition at line 615 of file locus_carcerum.h.

◆ movable_buf_compare

embed_iword(*) MinimumSecurityGuard::movable_buf_compare(const CarcerMovableCfg *args)

Orders a movable cell's bytes.

Definition at line 616 of file locus_carcerum.h.

◆ movable_buf_measure

size_t(*) MinimumSecurityGuard::movable_buf_measure(const CarcerMovableCfg *args)

Bytes before a movable cell's next zero.

Definition at line 617 of file locus_carcerum.h.


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