|
memory_arena
|
Thread-local scratch arena interface for fast temporary allocations. More...
Include dependency graph for arena_tlscratch.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| void | destroy_thread_scratch_arena (void) |
| Destroy the thread-local scratch arena for the calling thread. | |
| t_arena * | get_thread_scratch_arena (void) |
| Get the thread-local scratch arena, resetting it before use. | |
| t_arena * | get_thread_scratch_arena_ref (void) |
| Access the raw thread-local arena pointer without initialization. | |
| void | set_thread_scratch_arena_size (size_t size) |
| Configure the initial size for the thread-local scratch arena. | |
Thread-local scratch arena interface for fast temporary allocations.
This header declares the API for managing thread-local memory arenas (t_arena) that are allocated and used independently by each thread. These arenas are:
_Thread_local)This system enables low-overhead temporary memory allocations in concurrent environments without requiring explicit synchronization.
Features:
set_thread_scratch_arena_size()destroy_thread_scratch_arena()get_thread_scratch_arena_ref()ARENA_ENABLE_THREAD_LOCAL_SCRATCH macro. It is not intended for use across threads and is separate from the general-purpose scratch pool. Definition in file arena_tlscratch.h.