mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
heap: Add new heap_caps_check_integrity_all() & heap_caps_check_integrity_addr() debugging functions
Easier to either check all heaps, or focus on checking a particular region.
This commit is contained in:

committed by
Angus Gratton

parent
325bd3a4dc
commit
f0d7cfdafe
@@ -359,3 +359,17 @@ bool heap_caps_check_integrity(uint32_t caps, bool print_errors)
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
bool heap_caps_check_integrity_all(bool print_errors)
|
||||
{
|
||||
return heap_caps_check_integrity(MALLOC_CAP_INVALID, print_errors);
|
||||
}
|
||||
|
||||
bool heap_caps_check_integrity_addr(intptr_t addr, bool print_errors)
|
||||
{
|
||||
heap_t *heap = find_containing_heap((void *)addr);
|
||||
if (heap == NULL) {
|
||||
return false;
|
||||
}
|
||||
return multi_heap_check(heap->heap, print_errors);
|
||||
}
|
||||
|
Reference in New Issue
Block a user