cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
cwist_scratch_t Struct Reference

Backing state for cwist_scratch_alloc()/CWIST_SCRATCH_DEFER: a single block-scoped allocation that prefers a recycled arena generation and falls back to cwist_alloc() when the request doesn't fit one (see cwist/core/mem/arena.h – only CWIST_ARENA_DEFAULT_GENERATION_BYTES-sized generations hit the zero-libttak-GC recycle path, so cwist_scratch_alloc() always requests the default size and never a custom one). More...

#include <alloc.h>

Public Attributes

cwist_arena_t * arena
 
void * ptr
 
int heap
 

Detailed Description

Backing state for cwist_scratch_alloc()/CWIST_SCRATCH_DEFER: a single block-scoped allocation that prefers a recycled arena generation and falls back to cwist_alloc() when the request doesn't fit one (see cwist/core/mem/arena.h – only CWIST_ARENA_DEFAULT_GENERATION_BYTES-sized generations hit the zero-libttak-GC recycle path, so cwist_scratch_alloc() always requests the default size and never a custom one).

Zero-initialize before use (= {0}); do not touch fields directly.

Definition at line 131 of file alloc.h.

Member Data Documentation

◆ arena

cwist_arena_t* cwist_scratch_t::arena

Definition at line 132 of file alloc.h.

◆ heap

int cwist_scratch_t::heap

Definition at line 134 of file alloc.h.

◆ ptr

void* cwist_scratch_t::ptr

Definition at line 133 of file alloc.h.


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