39#include <cx/thread/tlscleanup.h>
43#define SCRATCH_NBUFFERS 32
46#define SCRATCH_MIN_BUFFER_SIZE 64
49#define SCRATCH_MAX_REASONABLE_BUFFER_SIZE 1024
Comparison and clamping macros.
void * scratchGet(size_t sz)
#define SCRATCH_NBUFFERS
Number of rotating buffers per thread (must be power of 2)
Per-thread scratch buffer state.
int32 next
Next buffer index to allocate.
void * buf[SCRATCH_NBUFFERS]
Rotating buffer pool.