mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
mm/heap: add MM_BACKTRACE_DEFAULT to config backtrace record by default
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
@@ -186,4 +186,9 @@ config MM_KASAN
|
||||
bugs in native code. After turn on this option, Please
|
||||
add -fsanitize=kernel-address to CFLAGS/CXXFLAGS too.
|
||||
|
||||
config MM_BACKTRACE_DEFAULT
|
||||
bool "Enable the backtrace record by default"
|
||||
default n
|
||||
depends on DEBUG_MM
|
||||
|
||||
source "mm/iob/Kconfig"
|
||||
|
||||
@@ -213,6 +213,9 @@ FAR struct mm_heap_s *mm_initialize(FAR const char *name,
|
||||
#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
|
||||
heap->mm_procfs.name = name;
|
||||
heap->mm_procfs.heap = heap;
|
||||
#if defined (CONFIG_DEBUG_MM) && defined(CONFIG_MM_BACKTRACE_DEFAULT)
|
||||
heap->mm_procfs.backtrace = true;
|
||||
#endif
|
||||
procfs_register_meminfo(&heap->mm_procfs);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user