boards/sim: Add asan config to test the custom heap
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
4589c369be
commit
b3f568c216
@ -24,11 +24,13 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/fs/procfs.h>
|
||||
#include <nuttx/mm/mm.h>
|
||||
|
||||
#include "up_internal.h"
|
||||
@ -151,10 +153,10 @@ void mm_initialize(FAR struct mm_heap_s *heap, FAR const char *name,
|
||||
heap->mm_impl = impl;
|
||||
|
||||
#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MEMINFO)
|
||||
heap_impl->mm_procfs.name = name;
|
||||
heap_impl->mm_procfs.mallinfo = (FAR void *)mm_mallinfo;
|
||||
heap_impl->mm_procfs.user_data = heap;
|
||||
procfs_register_meminfo(&heap_impl->mm_procfs);
|
||||
impl->mm_procfs.name = name;
|
||||
impl->mm_procfs.mallinfo = (FAR void *)mm_mallinfo;
|
||||
impl->mm_procfs.user_data = heap;
|
||||
procfs_register_meminfo(&impl->mm_procfs);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
32
boards/sim/sim/sim/configs/asan/defconfig
Normal file
32
boards/sim/sim/sim/configs/asan/defconfig
Normal file
@ -0,0 +1,32 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
CONFIG_ARCH="sim"
|
||||
CONFIG_ARCH_BOARD="sim"
|
||||
CONFIG_ARCH_BOARD_SIM=y
|
||||
CONFIG_ARCH_CHIP="sim"
|
||||
CONFIG_ARCH_SIM=y
|
||||
CONFIG_BOARDCTL_POWEROFF=y
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEV_LOOP=y
|
||||
CONFIG_DEV_ZERO=y
|
||||
CONFIG_EXAMPLES_HELLO=y
|
||||
CONFIG_FS_BINFS=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_MM_CUSTOMIZE_MANAGER=y
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_READLINE=y
|
||||
CONFIG_READLINE_TABCOMPLETION=y
|
||||
CONFIG_SCHED_HAVE_PARENT=y
|
||||
CONFIG_SCHED_ONEXIT=y
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SIM_SANITIZE=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TESTING_OSTEST=y
|
||||
CONFIG_USER_ENTRYPOINT="nsh_main"
|
Loading…
Reference in New Issue
Block a user