|
rlib
Convenience library for useful things
|
Allocator backend slots routed through by every rlib heap helper. More...
#include <rlib/rmem.h>
Data Fields | |
| rpointer(* | malloc )(rsize size) |
| rpointer(* | calloc )(rsize count, rsize size) |
| rpointer(* | realloc )(rpointer ptr, rsize size) |
| void(* | free )(rpointer ptr) |
Allocator backend slots routed through by every rlib heap helper.
The function-pointer signatures match libc malloc / calloc / realloc / free verbatim, so the default vtable is just the libc entries. A process may install a custom vtable (debug allocator, leak tracker, fixed-pool allocator, ...) at startup via r_mem_set_vtable.
| void(* RMemVTable::free) (rpointer ptr) |
libc-free-equivalent slot.