2 #include <mono/utils/mono-publib.h>
13 * mono_set_allocator_vtable
15 * Make the runtime use the functions in @vtable for allocating memory.
16 * The provided functions must have the same semantics of their libc's equivalents.
18 * @return TRUE is the vtable was installed. FALSE if the version is incompatible.
21 mono_set_allocator_vtable (MonoAllocatorVTable
* vtable
)
23 if (vtable
->version
!= MONO_ALLOCATOR_VTABLE_VERSION
)
25 GMemVTable g_mem_vtable
= { vtable
->malloc
, vtable
->realloc
, vtable
->free
, vtable
->calloc
};
26 g_mem_set_vtable (&g_mem_vtable
);