heap_caps_malloc() function
Allocate a chunk of memory which has the given capabilities Equivalent semantics to libc malloc(), for capability-aware memory.
Syntax
void *heap_caps_malloc(size_t size,
uint32_t caps);
Arguments
size
Size, in bytes, of the amount of memory to allocate
caps
Bitwise OR of MALLOC_CAP_* flags indicating the type of memory to be returned
Return value
A pointer to the memory allocated on success, NULL on failure
Examples
heap_caps_malloc() is referenced by 23 libraries and example projects: