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

Type of the spat dispatch table. More...

#include <spatium.h>

Data Fields

mmgr_span(*) from (const SpatiumCfg *args)
mmgr_cspan(*) cfrom (const SpatiumCfg *args)
embed_bool(*) ok (const SpatiumCfg *args)
embed_bool(*) cok (const SpatiumCfg *args)
embed_bool(*) has_storage (const SpatiumCfg *args)
void(*) reset (const SpatiumCfg *args)
mmgr_span(*) after (const SpatiumCfg *args)
mmgr_span(*) first (const SpatiumCfg *args)
mmgr_cspan(*) produced (const SpatiumCfg *args)
mmgr_cspan(*) read (const SpatiumCfg *args)

Detailed Description

Type of the spat dispatch table.

Note
EMBED_TABLE_LAYOUT asserts the ten members sit at consecutive EMBED_FUNCTION_POINTER_BYTES offsets, with nothing else.
There is no len or room entry. mmgr_span is the caller's own value, and so span.pos and span.cap - span.pos are already in hand, and a call to fetch them would duplicate what reading the member already gives.

Definition at line 99 of file spatium.h.

Field Documentation

◆ from

mmgr_span(*) SpatiumNs::from(const SpatiumCfg *args)

Builds a fill span over a buffer.

Definition at line 101 of file spatium.h.

◆ cfrom

mmgr_cspan(*) SpatiumNs::cfrom(const SpatiumCfg *args)

Builds a read span over a buffer.

Definition at line 102 of file spatium.h.

◆ ok

embed_bool(*) SpatiumNs::ok(const SpatiumCfg *args)

Whether a fill span is still usable.

Definition at line 103 of file spatium.h.

◆ cok

embed_bool(*) SpatiumNs::cok(const SpatiumCfg *args)

Whether a read span is still usable.

Definition at line 104 of file spatium.h.

◆ has_storage

embed_bool(*) SpatiumNs::has_storage(const SpatiumCfg *args)

Whether the span covers any bytes at all.

Definition at line 105 of file spatium.h.

◆ reset

void(*) SpatiumNs::reset(const SpatiumCfg *args)

Returns pos to 0 and clears overflow.

Definition at line 106 of file spatium.h.

◆ after

mmgr_span(*) SpatiumNs::after(const SpatiumCfg *args)

The span beginning count bytes in.

Definition at line 107 of file spatium.h.

◆ first

mmgr_span(*) SpatiumNs::first(const SpatiumCfg *args)

The span covering only the first count bytes.

Definition at line 108 of file spatium.h.

◆ produced

mmgr_cspan(*) SpatiumNs::produced(const SpatiumCfg *args)

A read span over everything written.

Definition at line 109 of file spatium.h.

◆ read

mmgr_cspan(*) SpatiumNs::read(const SpatiumCfg *args)

A read span over the first count written.

Definition at line 110 of file spatium.h.


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