Function rax::set_allocator[][src]

pub unsafe fn set_allocator(
    malloc: extern "C" fn(size: size_t) -> *mut u8,
    realloc: extern "C" fn(ptr: *mut c_void, size: size_t) -> *mut u8,
    free: extern "C" fn(ptr: *mut c_void)
)

Rax internally makes calls to "malloc", "realloc" and "free" for all of it's heap memory needs. These calls can be patched with the supplied hooks. Do not call this method after Rax has been used at all. This must be called before using or calling any other Rax API function.