DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
DetArena Struct Reference

Double-ended arena over one region [base, base+size). More...

#include <arena.h>

Public Attributes

uint8_t * base
 Region start.
 
size_t size
 Region length in bytes.
 
size_t persist_end
 Persistent pool occupies [0, persist_end).
 
size_t scratch_top
 Scratch occupies [scratch_top, size).
 
size_t persist_used
 Bytes currently handed out by the persistent pool (payload).
 
size_t persist_hw
 High-water of persist_end (for sizing).
 
size_t scratch_hw
 High-water of scratch use (size - min scratch_top).
 

Detailed Description

Double-ended arena over one region [base, base+size).

persist_end and scratch_top are byte offsets from base; the free middle is [persist_end, scratch_top). The persistent pool owns [0, persist_end) (a chain of first-fit blocks); scratch owns [scratch_top, size) (bump). Initialize with det_arena_init(); do not touch the fields directly.

Definition at line 50 of file arena.h.

Member Data Documentation

◆ base

uint8_t* DetArena::base

◆ size

size_t DetArena::size

◆ persist_end

size_t DetArena::persist_end

Persistent pool occupies [0, persist_end).

Definition at line 54 of file arena.h.

Referenced by det_arena_free_bytes(), det_arena_init(), det_arena_persist_alloc(), and det_arena_persist_free().

◆ scratch_top

◆ persist_used

size_t DetArena::persist_used

Bytes currently handed out by the persistent pool (payload).

Definition at line 56 of file arena.h.

Referenced by det_arena_init(), det_arena_persist_alloc(), det_arena_persist_free(), and det_arena_persist_used().

◆ persist_hw

size_t DetArena::persist_hw

High-water of persist_end (for sizing).

Definition at line 57 of file arena.h.

Referenced by det_arena_init(), and det_arena_persist_alloc().

◆ scratch_hw

size_t DetArena::scratch_hw

High-water of scratch use (size - min scratch_top).

Definition at line 58 of file arena.h.

Referenced by det_arena_init(), and det_arena_scratch_alloc_aligned().


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