Function esp_idf_svc::hal::sys::heap_caps_calloc

source ยท
pub unsafe extern "C" fn heap_caps_calloc(
    n: usize,
    size: usize,
    caps: u32,
) -> *mut c_void
Expand description

@brief Allocate a chunk of memory which has the given capabilities. The initialized value in the memory is set to zero.

Equivalent semantics to libc calloc(), for capability-aware memory.

In IDF, calloc(p) is equivalent to heap_caps_calloc(p, MALLOC_CAP_8BIT).

@param n Number of continuing chunks of memory to allocate @param size Size, in bytes, of a chunk of memory to allocate @param caps Bitwise OR of MALLOC_CAP_* flags indicating the type of memory to be returned

@return A pointer to the memory allocated on success, NULL on failure