Function esp_idf_svc::sys::heap_caps_get_free_size

source ยท
pub unsafe extern "C" fn heap_caps_get_free_size(caps: u32) -> usize
Expand description

@brief Get the total free size of all the regions that have the given capabilities

This function takes all regions capable of having the given capabilities allocated in them and adds up the free space they have.

@note Note that because of heap fragmentation it is probably not possible to allocate a single block of memory of this size. Use heap_caps_get_largest_free_block() for this purpose.

@param caps Bitwise OR of MALLOC_CAP_* flags indicating the type of memory

@return Amount of free bytes in the regions