2
0

Kconfig 2.6 KB

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