#[unsafe(no_mangle)]pub unsafe extern "C" fn xmlMemSetup(
freeFunc: Option<xmlFreeFunc>,
mallocFunc: Option<xmlMallocFunc>,
reallocFunc: Option<xmlReallocFunc>,
strdupFunc: Option<xmlStrdupFunc>,
)Expand description
Set custom memory allocator functions.
§UPSTREAM-PARITY
void xmlMemSetup(xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc,
xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc);§SAFETY
- All function pointers must be valid (non-null) and thread-safe
- The functions must follow the C malloc/realloc/free/strdup contract
- Once set, the functions remain in effect until the next
xmlMemSetupcall - The caller is responsible for ensuring the functions remain valid for the entire time they are installed