![]() |
libghostty
|
#include <ghostty/vt/allocator.h>
Data Fields | |
void * | ctx |
const GhosttyAllocatorVtable * | vtable |
Custom memory allocator.
For functions that take an allocator pointer, a NULL pointer indicates that the default allocator should be used. The default allocator will be libc malloc/free if we're linking to libc. If libc isn't linked, a custom allocator is used (currently Zig's SMP allocator).
Usage example:
Definition at line 179 of file allocator.h.
void* ctx |
Opaque context pointer passed to all vtable functions. This allows the allocator implementation to maintain state or reference external resources needed for memory management.
Definition at line 185 of file allocator.h.
const GhosttyAllocatorVtable* vtable |
Pointer to the allocator's vtable containing function pointers for memory operations (alloc, resize, remap, free).
Definition at line 191 of file allocator.h.