mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-07 17:08:49 +00:00
heap/heap_caps: added special case for esp32s2 when handling memory allocated (and aliased) from IRAM
This commit is contained in:
@@ -31,7 +31,6 @@ TEST_CASE("realloc move data to a new heap type", "[heap]")
|
||||
|
||||
char *a = malloc(64);
|
||||
memcpy(a, buf, 64);
|
||||
|
||||
// move data from 'a' to IRAM
|
||||
char *b = heap_caps_realloc(a, 64, MALLOC_CAP_EXEC);
|
||||
TEST_ASSERT_NOT_NULL(b);
|
||||
@@ -40,7 +39,7 @@ TEST_CASE("realloc move data to a new heap type", "[heap]")
|
||||
TEST_ASSERT_EQUAL_HEX32_ARRAY(buf, b, 64/sizeof(uint32_t));
|
||||
|
||||
// Move data back to DRAM
|
||||
char *c = heap_caps_realloc(b, 48, MALLOC_CAP_8BIT);
|
||||
char *c = heap_caps_realloc(b, 48, MALLOC_CAP_8BIT);
|
||||
TEST_ASSERT_NOT_NULL(c);
|
||||
TEST_ASSERT_NOT_EQUAL(b, c);
|
||||
TEST_ASSERT(heap_caps_check_integrity(MALLOC_CAP_INVALID, true));
|
||||
|
||||
Reference in New Issue
Block a user