- Fix "test get allocated size"
- Add tests for the free / alloc hooks
- Call alloc function hook on malloc/realloc/calloc base functions
- Add caps parameter to the allocation hook function
After heap_idf.c has been added (where the FreeRTOS heap is a subset of the
ESP-IDF heap), xPortGetFreeHeapSize() was updated to only returns the free
size of the FreeRTOS heap and not the entire ESP-IDF heap.
This commit replaces calls of xPortGetFreeHeapSize() with
esp_get_free_heap_size() in places outside of FreeRTOS.
When light (or comprehensive) poisoning is enabled, the size requested by the user for allocation
is extended by a few bytes to store the canary header and footer. heap_caps_get_allocated_size() should
return the original size asked by the user (without the additional canary bytes).
test_malloc.c extended with a new test assuring that heap_caps_get_allocated_size() returns the proper size
regardless of the degree of poisoning.