Chapter 2. API Reference
CONFIG_HEAP_CORRUPTION_DETECTION
Heap corruption detection
Found in: Component config > Heap memory debugging
Enable heap poisoning features to detect heap corruption caused by out-of-bounds access to heap mem-
ory.
See the “Heap Memory Debugging”page of the IDF documentation for a description of each level of
heap corruption detection.
Available options:
• Basic (no poisoning) (HEAP_POISONING_DISABLED)
• Light impact (HEAP_POISONING_LIGHT)
• Comprehensive (HEAP_POISONING_COMPREHENSIVE)
CONFIG_HEAP_TRACING_DEST
Heap tracing
Found in: Component config > Heap memory debugging
Enables the heap tracing API defined in esp_heap_trace.h.
This function causes a moderate increase in IRAM code side and a minor increase in heap function
(malloc/free/realloc) CPU overhead, even when the tracing feature is not used. So it’s best to keep it
disabled unless tracing is being used.
Available options:
• Disabled (HEAP_TRACING_OFF)
• Standalone (HEAP_TRACING_STANDALONE)
• Host-based (HEAP_TRACING_TOHOST)
CONFIG_HEAP_TRACING_STACK_DEPTH
Heap tracing stack depth
Found in: Component config > Heap memory debugging
Number of stack frames to save when tracing heap operation callers.
More stack frames uses more memory in the heap trace buffer (and slows down allocation), but can
provide useful information.
CONFIG_HEAP_TASK_TRACKING
Enable heap task tracking
Found in: Component config > Heap memory debugging
Enables tracking the task responsible for each heap allocation.
This function depends on heap poisoning being enabled and adds four more bytes of overhead for each
block allocated.
CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS
Abort if memory allocation fails
Found in: Component config > Heap memory debugging
When enabled, if a memory allocation operation fails it will cause a system abort.
Default value:
• No (disabled)
Espressif Systems 1155
Submit Document Feedback
Release v4.4