mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-18 18:40:13 +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
@@ -15,11 +15,15 @@
|
||||
#include "heap_private.h"
|
||||
#include "esp_system.h"
|
||||
|
||||
#ifdef CONFIG_HEAP_USE_HOOKS
|
||||
#define CALL_HOOK(hook, ...) { \
|
||||
if (hook != NULL) { \
|
||||
hook(__VA_ARGS__); \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define CALL_HOOK(hook, ...) {}
|
||||
#endif
|
||||
|
||||
/* Forward declaration for base function, put in IRAM.
|
||||
* These functions don't check for errors after trying to allocate memory. */
|
||||
|
||||
Reference in New Issue
Block a user