5#ifndef LIBCLOD_MEMORY_H
6#define LIBCLOD_MEMORY_H
69 void *(*vm_alloc)(
void *user,
size_t size);
73 void (*
vm_free)(
void *user,
void *ptr,
size_t size);
101CLOD_API CLOD_NONNULL(1)
void clod_allocator_destroy(clod_allocator *allocator)
clod_allocator * clod_allocator_create(const struct clod_allocator_opts *opts)
Configuration options for libclod's memory allocator.
size_t dedicated_vm_threshold
void * vm_user
Passed to the allocator's vm_alloc method.
void(* vm_free)(void *user, void *ptr, size_t size)
size_t allocator_opts_size
Size of this struct for future-proofing.
void * self
Value passed to invocations of allocate and free.
void(* free)(void *ptr, void *self)
uint32_t size
Size of backing memory.