rlib
Convenience library for useful things
Loading...
Searching...
No Matches
RMemVTable Struct Reference

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)
 

Detailed Description

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.

Field Documentation

◆ calloc

rpointer(* RMemVTable::calloc) (rsize count, rsize size)

libc-calloc-equivalent slot.

◆ free

void(* RMemVTable::free) (rpointer ptr)

libc-free-equivalent slot.

◆ malloc

rpointer(* RMemVTable::malloc) (rsize size)

libc-malloc-equivalent slot.

◆ realloc

rpointer(* RMemVTable::realloc) (rpointer ptr, rsize size)

libc-realloc-equivalent slot.


The documentation for this struct was generated from the following file: