mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-01 23:14:08 +00:00
heap: Wrap the function hook feature under a configuration
also update heap_debug.rst and mem_alloc.rst to provide information about the feature
This commit is contained in:
committed by
Mahavir Jain
parent
5a1f0cd63c
commit
2f982107dc
@@ -182,6 +182,7 @@ TEST_CASE("test get allocated size", "[heap]")
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HEAP_USE_HOOKS
|
||||
// provide the definition of alloc and free hooks
|
||||
static const size_t alloc_size = 1234; // make this size atypical to be able to rely on it in the hook
|
||||
static const size_t expected_calls = 2; // one call for malloc/calloc and one call for realloc
|
||||
@@ -247,3 +248,4 @@ TEST_CASE("test allocation and free function hooks", "[heap]")
|
||||
|
||||
TEST_ASSERT_TRUE(test_success);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user