44#ifndef DETERMINISTICESPASYNCWEBSERVER_SCRATCH_H
45#define DETERMINISTICESPASYNCWEBSERVER_SCRATCH_H
User-facing configuration for DeterministicESPAsyncWebServer.
RAII scope guard for transient scratch borrows.
ScratchScope(const ScratchScope &)=delete
ScratchScope & operator=(const ScratchScope &)=delete
size_t scratch_mark(void)
Capture the current arena offset (a savepoint for scratch_release()).
size_t scratch_capacity(void)
Total arena capacity in bytes (DETWS_SCRATCH_ARENA_SIZE).
void * scratch_alloc(size_t n, size_t align)
Borrow n bytes of scratch, aligned to align.
size_t scratch_used(void)
Bytes currently handed out (0 immediately after a reset).
size_t scratch_high_water(void)
Largest scratch_used() value seen since boot (for sizing the arena).
void scratch_reset(void)
Reclaim the whole arena (empties it).
void scratch_release(size_t mark)
Reclaim everything allocated since mark (LIFO).