Skip to main content

xmlMemMalloc

Function xmlMemMalloc 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn xmlMemMalloc(size: usize) -> *mut c_void
Expand description

Allocate memory through the debug allocator (upstream xmlmemory.h).

void *xmlMemMalloc(size_t size);

Always libc-backed and tracked (upstream debug allocator contract): the block is recorded so xmlMemSize/xmlMemUsed/xmlMemBlocks observe it.

§SAFETY

  • The returned pointer must be freed with xmlMemFree (or xmlFree — plain libc pointer, candidate superset)