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

Bit writer state: the buffer, how much is written, and the partial byte. More...

#include <bitorum_introitus_exitus.h>

Data Fields

uint8_t * out
size_t cap
size_t bytes_written
uint8_t residue
embed_word bit_count
embed_bool overflow

Detailed Description

Bit writer state: the buffer, how much is written, and the partial byte.

Note
Built by mmgr_bitor_init, advanced by mmgr_bitor_put, and finished by mmgr_bitor_align.

Definition at line 35 of file bitorum_introitus_exitus.h.

Field Documentation

◆ out

uint8_t* mmgr_bitor::out

Destination buffer [BORROWS].

Definition at line 37 of file bitorum_introitus_exitus.h.

◆ cap

size_t mmgr_bitor::cap

Bytes available in out.

Definition at line 38 of file bitorum_introitus_exitus.h.

◆ bytes_written

size_t mmgr_bitor::bytes_written

Whole bytes written so far.

Definition at line 39 of file bitorum_introitus_exitus.h.

◆ residue

uint8_t mmgr_bitor::residue

Bits not yet written, in the low bit_count positions.

Definition at line 40 of file bitorum_introitus_exitus.h.

◆ bit_count

embed_word mmgr_bitor::bit_count

Bits stored in residue, always under 8.

Definition at line 41 of file bitorum_introitus_exitus.h.

◆ overflow

embed_bool mmgr_bitor::overflow

Set once a request would pass cap, which blocks later writes.

Definition at line 42 of file bitorum_introitus_exitus.h.


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