Function esp_idf_svc::sys::heap_caps_check_integrity_addr
source · pub unsafe extern "C" fn heap_caps_check_integrity_addr(
addr: isize,
print_errors: bool,
) -> bool
Expand description
@brief Check integrity of heap memory around a given address.
This function can be used to check the integrity of a single region of heap memory, which contains the given address.
This can be useful if debugging heap integrity for corruption at a known address, as it has a lower overhead than checking all heap regions. Note that if the corrupt address moves around between runs (due to timing or other factors) then this approach won’t work, and you should call heap_caps_check_integrity or heap_caps_check_integrity_all instead.
@note The entire heap region around the address is checked, not only the adjacent heap blocks.
@param addr Address in memory. Check for corruption in region containing this address. @param print_errors Print specific errors if heap corruption is found.
@return True if the heap containing the specified address is valid, False if at least one heap is corrupt or the address doesn’t belong to a heap region.