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

The max 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 max 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 zero fill runs before the cell's header goes free: the bytes are zero at the instant they become available.

Definition at line 953 of file locus_carcerum.h.

Field Documentation

◆ persistent_buf_alloc

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

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

Definition at line 955 of file locus_carcerum.h.

◆ persistent_buf_release

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

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

Definition at line 957 of file locus_carcerum.h.

◆ temporary_buf_alloc

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

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

Definition at line 960 of file locus_carcerum.h.

◆ who_owns_buf

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

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

Definition at line 962 of file locus_carcerum.h.

◆ buf_available

size_t(*) MaxSecurityGuard::buf_available(void)

Bytes between the two tiers.

Definition at line 963 of file locus_carcerum.h.

◆ buf_grow

void *(*) MaxSecurityGuard::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 964 of file locus_carcerum.h.

◆ movable_init

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

Definition at line 967 of file locus_carcerum.h.

◆ movable_buf_alloc

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

Definition at line 967 of file locus_carcerum.h.

◆ movable_buf_release

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

Zeroes owner's movable cell, then releases it.

Definition at line 968 of file locus_carcerum.h.

◆ movable_buf_read

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

Definition at line 970 of file locus_carcerum.h.

◆ movable_buf_write

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

Definition at line 970 of file locus_carcerum.h.

◆ movable_buf_compare

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

Definition at line 970 of file locus_carcerum.h.

◆ movable_buf_measure

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

Definition at line 970 of file locus_carcerum.h.


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