1menu "Heap memory debugging" 2 3 choice HEAP_CORRUPTION_DETECTION 4 prompt "Heap corruption detection" 5 default HEAP_POISONING_DISABLED 6 help 7 Enable heap poisoning features to detect heap corruption caused by out-of-bounds access to heap memory. 8 9 See the "Heap Memory Debugging" page of the IDF documentation 10 for a description of each level of heap corruption detection. 11 12 config HEAP_POISONING_DISABLED 13 bool "Basic (no poisoning)" 14 config HEAP_POISONING_LIGHT 15 bool "Light impact" 16 config HEAP_POISONING_COMPREHENSIVE 17 bool "Comprehensive" 18 endchoice 19 20 choice HEAP_TRACING_DEST 21 bool "Heap tracing" 22 default HEAP_TRACING_OFF 23 help 24 Enables the heap tracing API defined in esp_heap_trace.h. 25 26 This function causes a moderate increase in IRAM code side and a minor increase in heap function 27 (malloc/free/realloc) CPU overhead, even when the tracing feature is not used. 28 So it's best to keep it disabled unless tracing is being used. 29 30 config HEAP_TRACING_OFF 31 bool "Disabled" 32 config HEAP_TRACING_STANDALONE 33 bool "Standalone" 34 select HEAP_TRACING 35 config HEAP_TRACING_TOHOST 36 bool "Host-based" 37 select HEAP_TRACING 38 endchoice 39 40 config HEAP_TRACING 41 bool 42 default F 43 help 44 Enables/disables heap tracing API. 45 46 config HEAP_TRACING_STACK_DEPTH 47 int "Heap tracing stack depth" 48 range 0 10 49 default 2 50 depends on HEAP_TRACING 51 help 52 Number of stack frames to save when tracing heap operation callers. 53 54 More stack frames uses more memory in the heap trace buffer (and slows down allocation), but 55 can provide useful information. 56 57 config HEAP_TASK_TRACKING 58 bool "Enable heap task tracking" 59 depends on !HEAP_POISONING_DISABLED 60 help 61 Enables tracking the task responsible for each heap allocation. 62 63 This function depends on heap poisoning being enabled and adds four more bytes of overhead for each block 64 allocated. 65 66 config HEAP_ABORT_WHEN_ALLOCATION_FAILS 67 bool "Abort if memory allocation fails" 68 default n 69 help 70 When enabled, if a memory allocation operation fails it will cause a system abort. 71 72endmenu 73