mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-15 06:26:49 +00:00
freertos(IDF): Remove usage of xPortGetFreeHeapSize() outside FreeRTOS
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.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "freertos/queue.h"
|
||||
#include "unity.h"
|
||||
#include "esp_heap_caps.h"
|
||||
#include "esp_system.h"
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
@@ -127,7 +128,7 @@ TEST_CASE("unreasonable allocs should all fail", "[heap]")
|
||||
TEST_ASSERT_NULL(test_malloc_wrapper(16*1024*1024));
|
||||
TEST_ASSERT_NULL(test_malloc_wrapper(SIZE_MAX / 2));
|
||||
TEST_ASSERT_NULL(test_malloc_wrapper(SIZE_MAX - 256));
|
||||
TEST_ASSERT_NULL(test_malloc_wrapper(xPortGetFreeHeapSize() - 1));
|
||||
TEST_ASSERT_NULL(test_malloc_wrapper(esp_get_free_heap_size() - 1));
|
||||
}
|
||||
|
||||
TEST_CASE("malloc(0) should return a NULL pointer", "[heap]")
|
||||
|
Reference in New Issue
Block a user