heap: Fix spurious heap_caps_check_integrity() errors in Comprehensive mode

Heap was not being locked before poisoning, so heap_caps_check_integrity()
would sometimes race with checking the poison bytes and print unnecessary
errors.

Details: https://esp32.com/viewtopic.php?f=2&t=3348&p=15732#p15732
This commit is contained in:
Angus Gratton
2017-10-18 14:54:55 +08:00
committed by Angus Gratton
parent 2e8441df9e
commit 04188d8ec7
5 changed files with 108 additions and 42 deletions

View File

@@ -91,6 +91,8 @@ multi_heap_handle_t multi_heap_register(void *start, size_t size);
*
* The lock argument is supplied to the MULTI_HEAP_LOCK() and MULTI_HEAP_UNLOCK() macros, defined in multi_heap_platform.h.
*
* The lock in question must be recursive.
*
* When the heap is first registered, the associated lock is NULL.
*
* @param heap Handle to a registered heap.