Function TVMFFISetCustomAllocator#
Defined in File c_api.h
Function Documentation#
-
int TVMFFISetCustomAllocator(TVMFFICustomAllocator *allocator)#
Register the process-wide custom allocator.
Note
allocatormust be alive throughout the lifetime of the process.Note
Not synchronized against concurrent
TVMFFIGetCustomAllocatoror object creation. Install the allocator once during single-threaded frontend initialization, before any object of a custom-allocated type crosses into the frontend.- Parameters:
allocator – Pointer to a TVMFFICustomAllocator, or NULL to restore the builtin default.
- Returns:
0 on success, nonzero on failure.