2012-04-06 17:49:35 +02:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
2015-06-28 16:08:57 +02:00
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
2012-04-06 17:49:35 +02:00
|
|
|
#
|
2012-04-11 16:47:25 +02:00
|
|
|
|
2021-03-03 07:13:37 +01:00
|
|
|
choice
|
|
|
|
prompt "Build heap manager"
|
|
|
|
default MM_DEFAULT_MANAGER
|
|
|
|
|
|
|
|
config MM_DEFAULT_MANAGER
|
|
|
|
bool "Default heap manager"
|
|
|
|
---help---
|
|
|
|
NuttX original memory manager strategy.
|
|
|
|
|
2021-03-08 10:21:23 +01:00
|
|
|
config MM_TLSF_MANAGER
|
|
|
|
bool "TLSF heap manager"
|
|
|
|
---help---
|
|
|
|
TLSF memory manager strategy.
|
|
|
|
|
2021-03-03 07:13:37 +01:00
|
|
|
config MM_CUSTOMIZE_MANAGER
|
|
|
|
bool "Customized heap manager"
|
|
|
|
---help---
|
2021-07-30 07:06:14 +02:00
|
|
|
Customized memory manager policy. The build will fail
|
2021-03-03 07:13:37 +01:00
|
|
|
if the MM heap module not defined by customer.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2013-03-09 02:27:42 +01:00
|
|
|
config MM_KERNEL_HEAP
|
2023-01-11 19:32:05 +01:00
|
|
|
bool "Kernel dedicated heap"
|
2023-07-15 19:04:21 +02:00
|
|
|
default BUILD_PROTECTED || BUILD_KERNEL
|
2013-03-09 02:27:42 +01:00
|
|
|
---help---
|
2023-01-11 19:32:05 +01:00
|
|
|
Under Flat build, this option will enable a separate heap for the kernel.
|
|
|
|
By separating the kernel and userspace heaps, the user is granted more
|
|
|
|
control over the heaps placement within the memory hierarchy, which is
|
|
|
|
specially useful for microcontrollers that provide External RAM.
|
|
|
|
Besides segregating the kernel and userspace allocations, this feature
|
|
|
|
does not prevent the userspace from accessing the kernel heap.
|
|
|
|
|
|
|
|
As for Protected and Kernel builds, this feature partitions heap memory
|
|
|
|
into two parts:
|
|
|
|
(1) a protected, kernel-mode heap accessible only by the NuttX kernel,
|
|
|
|
and (2) an unprotected user-mode heap for use by applications.
|
|
|
|
If you are only interested in protecting the kernel from read access,
|
|
|
|
then this option is not necessary. If you wish to secure the kernel data
|
|
|
|
as well, then this option should be selected.
|
2013-03-09 02:27:42 +01:00
|
|
|
|
2013-03-09 22:12:20 +01:00
|
|
|
The kernel heap size that is used is provided a a platform-specific
|
|
|
|
up_allocate_kheap() interface. This configuration setting is made
|
|
|
|
available to that platform specific code. However, the
|
|
|
|
up_allocate_kheap() interface may chose to ignore this setting if it
|
|
|
|
has a more appropriate heap allocation strategy.
|
|
|
|
|
2013-03-09 02:27:42 +01:00
|
|
|
config MM_KERNEL_HEAPSIZE
|
2020-02-12 04:54:23 +01:00
|
|
|
int "Kernel heap size"
|
2013-03-09 02:27:42 +01:00
|
|
|
default 8192
|
|
|
|
depends on MM_KERNEL_HEAP
|
|
|
|
---help---
|
|
|
|
This is the size of the a protected, kernel-mode heap (in bytes).
|
|
|
|
The remaining of available memory is given to the unprotected
|
|
|
|
user-mode heap. This value may need to be aligned to units of the
|
|
|
|
size of the smallest memory protection region.
|
|
|
|
|
2024-03-11 02:48:47 +01:00
|
|
|
config MM_DEFAULT_ALIGNMENT
|
2022-12-30 09:30:55 +01:00
|
|
|
int "Memory default alignment in bytes"
|
2023-03-06 09:10:31 +01:00
|
|
|
default 0
|
2022-12-30 09:30:55 +01:00
|
|
|
range 0 64
|
|
|
|
---help---
|
|
|
|
The memory default alignment in bytes, if this value is 0, the real
|
|
|
|
memory default alignment is equal to sizoef(uintptr), if this value
|
|
|
|
is not 0, this value must be 2^n and at least sizeof(uintptr).
|
|
|
|
|
2012-04-11 16:47:25 +02:00
|
|
|
config MM_SMALL
|
|
|
|
bool "Small memory model"
|
|
|
|
default n
|
2022-11-05 17:29:11 +01:00
|
|
|
depends on MM_DEFAULT_MANAGER
|
2012-04-11 16:47:25 +02:00
|
|
|
---help---
|
|
|
|
Each memory allocation has a small allocation overhead. The size
|
|
|
|
of that overhead is normally determined by the "width" of the
|
|
|
|
address support by the MCU. MCUs that support 16-bit addressability
|
|
|
|
have smaller overhead than devices that support 32-bit addressability.
|
|
|
|
However, there are many MCUs that support 32-bit addressability *but*
|
|
|
|
have internal SRAM of size less than or equal to 64Kb. In this case,
|
2013-04-25 23:52:00 +02:00
|
|
|
MM_SMALL can be defined so that those MCUs will also benefit
|
2012-04-11 16:47:25 +02:00
|
|
|
from the smaller, 16-bit-based allocation overhead.
|
2012-09-06 01:02:43 +02:00
|
|
|
|
2013-06-10 19:57:37 +02:00
|
|
|
WARNING: This selection will also change the alignment of allocated
|
|
|
|
memory. For example, on ARM memory will have 8-byte alignment by
|
|
|
|
default. If MM_SMALL is selected, then allocated memory will have
|
|
|
|
only 4-byte alignment. This may be important on some platforms where
|
|
|
|
64-bit data is in allocated structures and 8-byte alignment is required.
|
|
|
|
|
2012-09-06 01:02:43 +02:00
|
|
|
config MM_REGIONS
|
|
|
|
int "Number of memory regions"
|
|
|
|
default 1
|
|
|
|
---help---
|
|
|
|
If the architecture includes multiple, non-contiguous regions of
|
|
|
|
memory to allocate from, this specifies the number of memory regions
|
|
|
|
that the memory manager must handle and enables the API
|
2013-03-08 23:01:50 +01:00
|
|
|
mm_addregion(heap, start, end);
|
2012-09-06 01:02:43 +02:00
|
|
|
|
2023-07-18 13:39:26 +02:00
|
|
|
config MM_MAP_COUNT_MAX
|
|
|
|
int "The maximum number of memory map areas for each task"
|
|
|
|
default 1024
|
|
|
|
---help---
|
|
|
|
The maximum number of memory map areas for each task.
|
|
|
|
|
2012-09-06 01:02:43 +02:00
|
|
|
config ARCH_HAVE_HEAP2
|
|
|
|
bool
|
2014-01-23 19:06:57 +01:00
|
|
|
default n
|
|
|
|
|
|
|
|
if ARCH_HAVE_HEAP2
|
2012-09-06 01:02:43 +02:00
|
|
|
|
|
|
|
config HEAP2_BASE
|
2013-03-08 21:36:18 +01:00
|
|
|
hex "Start address of second user heap region"
|
2012-09-06 01:02:43 +02:00
|
|
|
default 0x00000000
|
|
|
|
---help---
|
|
|
|
The base address of the second heap region.
|
|
|
|
|
|
|
|
config HEAP2_SIZE
|
2013-03-08 21:36:18 +01:00
|
|
|
int "Size of the second user heap region"
|
2012-09-06 01:02:43 +02:00
|
|
|
default 0
|
|
|
|
---help---
|
|
|
|
The size of the second heap region.
|
|
|
|
|
2014-01-23 19:06:57 +01:00
|
|
|
endif # ARCH_HAVE_HEAP2
|
|
|
|
|
2012-09-11 22:33:58 +02:00
|
|
|
config GRAN
|
|
|
|
bool "Enable Granule Allocator"
|
|
|
|
default n
|
|
|
|
---help---
|
2014-08-24 00:35:52 +02:00
|
|
|
Enable granule allocator support. Allocations will be aligned to the
|
2012-09-11 22:33:58 +02:00
|
|
|
granule size; allocations will be in units of the granule size.
|
|
|
|
Larger granules will give better performance and less overhead but
|
|
|
|
more losses of memory due to alignment and quantization waste.
|
|
|
|
|
|
|
|
NOTE: The current implementation also restricts the maximum
|
2018-07-09 02:24:45 +02:00
|
|
|
allocation size to 32 granules. That restriction could be
|
2012-09-11 22:33:58 +02:00
|
|
|
eliminated with some additional coding effort.
|
|
|
|
|
2012-09-12 17:18:56 +02:00
|
|
|
config GRAN_INTR
|
|
|
|
bool "Interrupt level support"
|
|
|
|
default n
|
|
|
|
depends on GRAN
|
|
|
|
---help---
|
|
|
|
Normally mutual exclusive access to granule allocator data is assured
|
|
|
|
using a semaphore. If this option is set then, instead, mutual
|
|
|
|
exclusion logic will disable interrupts. While this options is more
|
|
|
|
invasive to system performance, it will also support use of the granule
|
|
|
|
allocator from interrupt level logic.
|
|
|
|
|
2012-09-11 22:33:58 +02:00
|
|
|
config DEBUG_GRAN
|
|
|
|
bool "Granule Allocator Debug"
|
|
|
|
default n
|
2016-06-11 22:14:08 +02:00
|
|
|
depends on GRAN && DEBUG_FEATURES
|
2012-09-11 22:33:58 +02:00
|
|
|
---help---
|
2014-08-24 00:35:52 +02:00
|
|
|
Just like DEBUG_MM, but only generates output from the gran
|
2012-09-11 22:33:58 +02:00
|
|
|
allocation logic.
|
2014-08-24 00:35:52 +02:00
|
|
|
|
|
|
|
config MM_PGALLOC
|
|
|
|
bool "Enable Page Allocator"
|
|
|
|
default n
|
2014-08-29 22:47:22 +02:00
|
|
|
depends on ARCH_USE_MMU
|
2014-08-24 00:35:52 +02:00
|
|
|
select GRAN
|
|
|
|
---help---
|
|
|
|
Enable support for a MMU physical page allocator based on the
|
|
|
|
granule allocator.
|
|
|
|
|
|
|
|
if MM_PGALLOC
|
|
|
|
|
|
|
|
config MM_PGSIZE
|
|
|
|
int "Page Size"
|
|
|
|
default 4096
|
2014-09-28 00:11:48 +02:00
|
|
|
---help---
|
2014-08-24 00:35:52 +02:00
|
|
|
The MMU page size. Must be one of {1024, 2048, 4096, 8192, or
|
|
|
|
16384}. This is easily extensible, but only those values are
|
|
|
|
currently support.
|
|
|
|
|
|
|
|
config DEBUG_PGALLOC
|
|
|
|
bool "Page Allocator Debug"
|
|
|
|
default n
|
2016-06-11 22:14:08 +02:00
|
|
|
depends on DEBUG_FEATURES
|
2014-08-24 00:35:52 +02:00
|
|
|
---help---
|
|
|
|
Just like DEBUG_MM, but only generates output from the page
|
|
|
|
allocation logic.
|
|
|
|
|
|
|
|
endif # MM_PGALLOC
|
2014-09-23 15:11:47 +02:00
|
|
|
|
|
|
|
config MM_SHM
|
|
|
|
bool "Shared memory support"
|
|
|
|
default n
|
2022-09-16 07:08:21 +02:00
|
|
|
depends on MM_PGALLOC && BUILD_KERNEL
|
2023-01-11 10:56:59 +01:00
|
|
|
select ARCH_VMA_MAPPING
|
2014-09-23 15:11:47 +02:00
|
|
|
---help---
|
2024-04-17 05:21:22 +02:00
|
|
|
Build support for mapping physical memory to user-space via
|
|
|
|
shared memory interfaces like shmget(), shmat(), shmctl(),
|
|
|
|
etc, or device mapping interfaces like vm_map_region() etc.
|
2014-09-23 15:11:47 +02:00
|
|
|
|
2023-04-13 15:25:22 +02:00
|
|
|
config MM_KMAP
|
|
|
|
bool "Support for dynamic kernel virtual mappings"
|
|
|
|
default n
|
|
|
|
depends on MM_PGALLOC && BUILD_KERNEL
|
2024-04-13 23:29:21 +02:00
|
|
|
select ARCH_KVMA_MAPPING
|
2023-04-13 15:25:22 +02:00
|
|
|
---help---
|
|
|
|
Build support for dynamically mapping pages from the page pool into
|
|
|
|
kernel virtual memory. This includes pages that are already mapped
|
|
|
|
for user.
|
|
|
|
|
2022-10-30 04:34:24 +01:00
|
|
|
config MM_HEAP_MEMPOOL_THRESHOLD
|
2024-06-18 06:26:27 +02:00
|
|
|
int "The default size of threshold to avoid using multiple mempool in heap"
|
|
|
|
default -1
|
2022-10-30 04:34:24 +01:00
|
|
|
---help---
|
|
|
|
If the size of the memory requested by the user is less
|
|
|
|
than the threshold, the memory will be requested from the
|
|
|
|
multiple mempool by default.
|
2024-06-18 06:26:27 +02:00
|
|
|
> 0 Enable pool feature, and set umm/kmm pool threshold size.
|
|
|
|
== 0 Enable pool feature, but disable the umm/kmm pool function.
|
|
|
|
< 0 Disable pool feature.
|
2022-10-30 04:34:24 +01:00
|
|
|
|
2023-05-26 04:42:50 +02:00
|
|
|
config MM_HEAP_MEMPOOL_EXPAND_SIZE
|
2022-10-30 04:34:24 +01:00
|
|
|
int "The expand size for each mempool in multiple mempool"
|
2022-11-23 15:08:13 +01:00
|
|
|
default 4096
|
2024-06-18 06:26:27 +02:00
|
|
|
depends on MM_HEAP_MEMPOOL_THRESHOLD > 0
|
2022-10-30 04:34:24 +01:00
|
|
|
---help---
|
|
|
|
This size describes the size of each expansion of each memory
|
|
|
|
pool with insufficient memory in the multi-level memory pool.
|
|
|
|
|
2023-05-26 04:42:50 +02:00
|
|
|
config MM_HEAP_MEMPOOL_DICTIONARY_EXPAND_SIZE
|
2023-11-24 16:56:47 +01:00
|
|
|
int "The expand size for multiple mempool's dictionary"
|
2023-05-26 04:42:50 +02:00
|
|
|
default MM_HEAP_MEMPOOL_EXPAND_SIZE
|
2024-06-18 06:26:27 +02:00
|
|
|
depends on MM_HEAP_MEMPOOL_THRESHOLD > 0
|
2022-12-22 14:18:09 +01:00
|
|
|
---help---
|
2023-11-24 16:56:47 +01:00
|
|
|
This size describes the multiple mempool dictionary expand.
|
2022-12-22 14:18:09 +01:00
|
|
|
|
2023-05-26 04:42:50 +02:00
|
|
|
config MM_HEAP_MEMPOOL_CHUNK_SIZE
|
|
|
|
int "The multiples pool chunk size"
|
|
|
|
default 0
|
2024-06-18 06:26:27 +02:00
|
|
|
depends on MM_HEAP_MEMPOOL_THRESHOLD > 0
|
2023-05-26 04:42:50 +02:00
|
|
|
---help---
|
|
|
|
This size describes the multiple mempool chunk size.
|
|
|
|
|
2023-05-10 16:13:20 +02:00
|
|
|
config MM_HEAP_MEMPOOL_BACKTRACE_SKIP
|
|
|
|
int "The skip depth of backtrace for mempool"
|
|
|
|
default 6
|
|
|
|
depends on MM_HEAP_MEMPOOL_THRESHOLD != 0 && MM_BACKTRACE > 0
|
|
|
|
---help---
|
|
|
|
This number is the skipped backtrace depth for mempool.
|
|
|
|
|
2022-07-29 06:17:14 +02:00
|
|
|
config FS_PROCFS_EXCLUDE_MEMPOOL
|
|
|
|
bool "Exclude mempool"
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2022-07-29 06:17:14 +02:00
|
|
|
depends on FS_PROCFS
|
|
|
|
|
2021-10-09 09:22:28 +02:00
|
|
|
config MM_KASAN
|
|
|
|
bool "Kernel Address Sanitizer"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
KASan is a fast compiler-based tool for detecting memory
|
|
|
|
bugs in native code. After turn on this option, Please
|
|
|
|
add -fsanitize=kernel-address to CFLAGS/CXXFLAGS too.
|
|
|
|
|
2024-03-14 09:40:52 +01:00
|
|
|
if MM_KASAN
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "KAsan Mode"
|
|
|
|
default MM_KASAN_GENERIC
|
|
|
|
|
2024-08-20 04:41:56 +02:00
|
|
|
config MM_KASAN_NONE
|
|
|
|
bool "KAsan disable"
|
|
|
|
---help---
|
|
|
|
Disable KASan check
|
|
|
|
|
2024-03-14 09:40:52 +01:00
|
|
|
config MM_KASAN_GENERIC
|
|
|
|
bool "KAsan generic mode"
|
|
|
|
---help---
|
|
|
|
KASan generic mode that does not require hardware support at all
|
|
|
|
|
|
|
|
config MM_KASAN_SW_TAGS
|
|
|
|
bool "KAsan SW tags"
|
|
|
|
depends on ARCH_ARM64
|
|
|
|
---help---
|
|
|
|
KAsan based on software tags
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2022-08-20 00:28:39 +02:00
|
|
|
config MM_KASAN_ALL
|
|
|
|
bool "Enable KASan for the entire image"
|
|
|
|
depends on MM_KASAN
|
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
This option activates address sanitizer for the entire image.
|
|
|
|
If you don't enable this option, you have to explicitly specify
|
|
|
|
"-fsanitize=kernel-address" for the files/directories you want
|
|
|
|
to check. Enabling this option will get image size increased
|
|
|
|
and performance decreased significantly.
|
|
|
|
|
2024-08-20 04:41:56 +02:00
|
|
|
config MM_KASAN_WATCHPOINT
|
|
|
|
int "Kasan watchpoint maximum number"
|
|
|
|
default 0
|
|
|
|
---help---
|
|
|
|
The maximum number of watchpoints that can be set by KASan.
|
|
|
|
|
2024-08-20 10:03:14 +02:00
|
|
|
config MM_KASAN_DISABLE_NULL_POINTER_CHECK
|
|
|
|
bool "Disable null pointer access check"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
This option enables KASan check null pointer access.
|
|
|
|
|
2023-08-31 12:11:39 +02:00
|
|
|
config MM_KASAN_DISABLE_READS_CHECK
|
|
|
|
bool "Disable reads check"
|
|
|
|
depends on MM_KASAN
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
This option disable kasan reads check. It speeds up performance
|
|
|
|
compared with default read/write check. Only disable it when you are
|
|
|
|
sure there's no need to do so. Or performance is too bad and only focus
|
|
|
|
on writes check.
|
|
|
|
|
|
|
|
config MM_KASAN_DISABLE_WRITES_CHECK
|
|
|
|
bool "Disable writes check"
|
|
|
|
depends on MM_KASAN
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
This option disable kasan writes check.
|
|
|
|
|
2024-04-07 12:20:17 +02:00
|
|
|
config MM_KASAN_GLOBAL
|
|
|
|
bool "Enable global data check"
|
2024-03-14 09:40:52 +01:00
|
|
|
depends on MM_KASAN_GENERIC
|
2024-04-07 12:20:17 +02:00
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
This option enables KASan global data check.
|
|
|
|
It's used to extract segments in the linker script.
|
|
|
|
Two new segments need to be created, one being
|
|
|
|
".kasan.unused: { *(.data..LASANLOC*) }",
|
|
|
|
used to eliminate excess data generated.
|
|
|
|
One is ".kasan.global:{
|
|
|
|
KEEP ( *(. data.. LASAN0))
|
|
|
|
KEEP ( *(. data. rel. local.. LASAN0))
|
|
|
|
}", used to extract data generated by the compiler
|
|
|
|
|
2024-05-14 09:58:32 +02:00
|
|
|
config MM_KASAN_DISABLE_READ_PANIC
|
|
|
|
bool "Disable panic on kasan read error"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
This option disable panic on kasan read error. It will print error info
|
|
|
|
and continue to run.
|
|
|
|
|
|
|
|
config MM_KASAN_DISABLE_WRITE_PANIC
|
|
|
|
bool "Disable panic on kasan write error"
|
2024-01-06 14:03:39 +01:00
|
|
|
depends on MM_KASAN
|
|
|
|
default n
|
|
|
|
---help---
|
2024-05-14 09:58:32 +02:00
|
|
|
This option disable panic on kasan write error. It will print error info
|
2024-01-06 14:03:39 +01:00
|
|
|
and continue to run.
|
|
|
|
|
2024-05-14 09:58:32 +02:00
|
|
|
endif # MM_KASAN
|
|
|
|
|
2022-08-19 10:09:59 +02:00
|
|
|
config MM_UBSAN
|
|
|
|
bool "Undefined Behavior Sanitizer"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
UBSan is a fast undefined behavior detector. UBSan modifies
|
|
|
|
the program at compile-time to catch various kinds of
|
|
|
|
undefined behavior during program execution
|
|
|
|
|
|
|
|
config MM_UBSAN_ALL
|
|
|
|
bool "Enable UBSan for the entire image"
|
|
|
|
depends on MM_UBSAN
|
|
|
|
default y
|
|
|
|
---help---
|
|
|
|
This option activates UBSan instrumentation for the
|
|
|
|
entire image. If you don't enable this option, you have to
|
|
|
|
explicitly specify "-fsanitize=undefined" for
|
|
|
|
the files/directories you want to check. Enabling this option
|
|
|
|
will get image size increased and performance decreased
|
|
|
|
significantly.
|
|
|
|
|
2022-09-02 06:42:45 +02:00
|
|
|
config MM_UBSAN_OPTION
|
|
|
|
string "UBSan options"
|
2022-11-05 17:34:01 +01:00
|
|
|
depends on MM_UBSAN
|
2022-09-02 06:42:45 +02:00
|
|
|
default "-fsanitize=undefined"
|
|
|
|
---help---
|
|
|
|
This option activates specified UBSan instrumentation. Please
|
|
|
|
refer to https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
|
|
|
|
for available options.
|
|
|
|
|
2022-08-19 10:09:59 +02:00
|
|
|
config MM_UBSAN_TRAP_ON_ERROR
|
2022-09-02 06:46:02 +02:00
|
|
|
bool "Enable UBSan trap on error to crash immediately"
|
2022-08-19 10:09:59 +02:00
|
|
|
depends on MM_UBSAN
|
2022-12-06 06:27:24 +01:00
|
|
|
default n
|
2022-08-19 10:09:59 +02:00
|
|
|
---help---
|
|
|
|
The undefined instruction trap should cause your program to crash,
|
|
|
|
save the code space significantly.
|
|
|
|
|
2024-07-08 18:32:34 +02:00
|
|
|
config MM_UBSAN_DUMMY
|
|
|
|
bool "Bypass Undefined Behaviour Sanitizer Runtime Actions"
|
|
|
|
default n
|
|
|
|
depends on MM_UBSAN
|
|
|
|
---help---
|
|
|
|
Keep UBSAN compile time but disable runtime actions.
|
|
|
|
|
2022-07-20 15:37:26 +02:00
|
|
|
config MM_FILL_ALLOCATIONS
|
|
|
|
bool "Fill allocations with debug value"
|
|
|
|
default n
|
|
|
|
---help---
|
2024-03-04 05:17:29 +01:00
|
|
|
Fill all malloc() allocations with MM_ALLOC_MAGIC.
|
|
|
|
Fill all add_addregion() with MM_INIT_MAGIC.
|
|
|
|
Fill all free() with MM_FREE_MAGIC.
|
|
|
|
This helps detecting uninitialized variable errors.
|
2022-07-20 15:37:26 +02:00
|
|
|
|
2022-05-20 10:37:14 +02:00
|
|
|
config MM_BACKTRACE
|
2022-07-04 09:41:06 +02:00
|
|
|
int "The depth of backtrace"
|
|
|
|
default -1
|
|
|
|
---help---
|
|
|
|
Config the depth of backtrace in memory block by specified this
|
|
|
|
config: disable backtrace by -1, only record pid info by zero and
|
|
|
|
enable record backtrace info by 8(fixed depth).
|
2022-05-20 10:37:14 +02:00
|
|
|
|
2023-05-10 16:13:20 +02:00
|
|
|
config MM_BACKTRACE_SKIP
|
|
|
|
int "The skip depth of backtrace"
|
|
|
|
depends on MM_BACKTRACE > 0
|
|
|
|
default 3
|
|
|
|
|
2022-03-22 03:37:49 +01:00
|
|
|
config MM_BACKTRACE_DEFAULT
|
|
|
|
bool "Enable the backtrace record by default"
|
|
|
|
default n
|
2022-07-04 09:41:06 +02:00
|
|
|
depends on MM_BACKTRACE > 0
|
2022-03-22 03:37:49 +01:00
|
|
|
|
2022-05-20 10:20:10 +02:00
|
|
|
config MM_DUMP_ON_FAILURE
|
|
|
|
bool "Dump heap info on allocation failure"
|
|
|
|
default n
|
|
|
|
depends on DEBUG_MM
|
|
|
|
|
2023-05-17 12:05:02 +02:00
|
|
|
config MM_DUMP_DETAILS_ON_FAILURE
|
|
|
|
bool "Dump all used memory blocks on allocation failure"
|
|
|
|
default n
|
|
|
|
depends on MM_DUMP_ON_FAILURE
|
|
|
|
|
2022-05-21 01:13:09 +02:00
|
|
|
config MM_PANIC_ON_FAILURE
|
|
|
|
bool "Panic on allocation failure"
|
|
|
|
default n
|
|
|
|
depends on DEBUG_MM
|
|
|
|
|
2023-08-29 11:52:23 +02:00
|
|
|
config MM_FREE_DELAYCOUNT_MAX
|
|
|
|
int "Maximum memory nodes can be delayed to free"
|
|
|
|
default 0
|
|
|
|
---help---
|
|
|
|
Set to 0 to disable the delayed free mechanism. Otherwise,
|
|
|
|
the value decides the maximum number of memory nodes that
|
|
|
|
will be delayed to free.
|
|
|
|
|
2017-05-09 15:34:59 +02:00
|
|
|
source "mm/iob/Kconfig"
|