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

A pair of buffers, one under fill while the other is under drain. More...

#include <memoria_externa.h>

Data Fields

uint8_t fill_index

Detailed Description

A pair of buffers, one under fill while the other is under drain.

Note
fill_index is the only member. The buffers it indexes live elsewhere.
The two roles are one bit. The drain index is this one's complement. A swap is a flip and there is no second member to retain in step.
Warning
What holds fill_index to 0 or 1 is the set in mmgr_pingpong_init and the flip in mmgr_pingpong_swap. A pair that did not go through mmgr_pingpong_init carries whatever its storage contained, and no call here tests the value.

Definition at line 47 of file memoria_externa.h.

Field Documentation

◆ fill_index

uint8_t PingPong::fill_index

Index of the buffer under fill, 0 or 1.

Definition at line 49 of file memoria_externa.h.


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