Skip to main content

xmlRealloc

Function xmlRealloc 

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

Reallocate memory.

§UPSTREAM-PARITY

void *xmlRealloc(void *ptr, size_t size);

Changes the size of the memory block pointed to by ptr. If ptr is NULL, behaves like xmlMalloc. If size is 0, may return NULL (like C realloc).

§SAFETY

  • ptr must be a valid pointer from xmlMalloc, xmlMallocAtomic, or xmlRealloc, or NULL
  • The returned pointer must be freed with xmlFree