Function gnunet_sys::GNUNET_xmemdup_[][src]

pub unsafe extern "C" fn GNUNET_xmemdup_(
    buf: *const c_void,
    size: usize,
    filename: *const c_char,
    linenumber: c_int
) -> *mut c_void

Allocate and initialize memory. Checks the return value, aborts if no more memory is available. Don’t use GNUNET_xmemdup_ directly. Use the #GNUNET_memdup macro.

@param buf buffer to initialize from (must contain size bytes) @param size number of bytes to allocate @param filename where is this call being made (for debugging) @param linenumber line where this call is being made (for debugging) @return allocated memory, never NULL