Skip to main content

xmlMallocImpl

Function xmlMallocImpl 

Source
pub unsafe extern "C" fn xmlMallocImpl(size: usize) -> *mut c_void
Expand description

Allocate memory.

§UPSTREAM-PARITY

void *xmlMalloc(size_t size);

Returns a pointer to the allocated memory, or NULL on failure. The allocated memory is not initialized (like malloc).

§SAFETY

  • The returned pointer must be freed with xmlFree
  • size may be 0 (returns a valid non-NULL pointer or NULL)

This is the implementation backing the exported xmlMalloc data global (upstream xmlmemory.h: XMLPUBVAR xmlMallocFunc xmlMalloc; — a function- pointer variable, not a function).