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

The maximum security guard over one cellblock: every release zeroes the cell first. 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 maximum security guard over one cellblock: every release zeroes the cell first.

Note
EMBED_TABLE_LAYOUT asserts the thirteen members sit at consecutive EMBED_FUNCTION_POINTER_BYTES offsets, with nothing else.
The same thirteen entries, and no unzeroed release among them. Each zeroing runs before the cell's header goes free: the bytes are zero at the instant they become available.

Definition at line 631 of file locus_carcerum.h.

Field Documentation

◆ persistent_buf_alloc

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

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

Definition at line 633 of file locus_carcerum.h.

◆ persistent_buf_release

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

Zeroes owner's cell of either tier, then releases it [TAKES OWNERSHIP].

Definition at line 635 of file locus_carcerum.h.

◆ temporary_buf_alloc

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

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

Definition at line 638 of file locus_carcerum.h.

◆ who_owns_buf

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

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

Definition at line 640 of file locus_carcerum.h.

◆ buf_available

size_t(*) MaximumSecurityGuard::buf_available(void)

Bytes between the two tiers.

Definition at line 641 of file locus_carcerum.h.

◆ buf_grow

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

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

Definition at line 642 of file locus_carcerum.h.

◆ movable_init

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

Assigns the movable option, once.

Definition at line 645 of file locus_carcerum.h.

◆ movable_buf_alloc

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

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

Definition at line 646 of file locus_carcerum.h.

◆ movable_buf_release

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

Zeroes owner's movable cell, then releases it.

Definition at line 648 of file locus_carcerum.h.

◆ movable_buf_read

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

Copies out of a movable cell.

Definition at line 650 of file locus_carcerum.h.

◆ movable_buf_write

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

Copies into a movable cell.

Definition at line 651 of file locus_carcerum.h.

◆ movable_buf_compare

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

Orders a movable cell's bytes.

Definition at line 652 of file locus_carcerum.h.

◆ movable_buf_measure

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

Bytes before a movable cell's next zero.

Definition at line 653 of file locus_carcerum.h.


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