From 60f7b3affc716b8ba417a088475b1007fbe8af6d Mon Sep 17 00:00:00 2001 From: Shell Date: Mon, 2 Dec 2024 15:15:59 +0800 Subject: feat: mm: page poison debugging and assertion enhancements This commit introduces a page poison debugging mechanism and additional assertions for memory management, improving system maintainability and debugging capabilities. The changes aim to detect illegal memory usage early and provide better clarity in managing page allocations. Changes: - Added `RT_DEBUGGING_PAGE_POISON` option to enable memory usage tracing. - Introduced a page poisoner for detecting illegal memory usage. - Implemented region-based memory tracking using bitmaps. - Enhanced spinlock protection for memory management operations. - Fixed several assertion checks for memory safety. - Renamed macros for consistency (`FLOOR` to `CEIL`). - Refined memory allocation and deallocation logic to include poisoning. - Updated Kconfig to add configurable `RT_PAGE_MAX_ORDER` and poison debugging. - Improved debugging outputs for page regions and memory operations. Signed-off-by: Shell --- src/Kconfig | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src') diff --git a/src/Kconfig b/src/Kconfig index 75c59ad651..8c486701d0 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -289,17 +289,6 @@ endmenu menu "Memory Management" - config RT_PAGE_MAX_ORDER - int "Max order of pages allocatable by page allocator" - default 11 - depends on ARCH_MM_MMU - help - For example, A value of 11 means the maximum chunk of contiguous memory - allocatable by page system is 2^(11 + ARCH_PAGE_BITS - 1) Bytes. - Large memory requirement can consume all system resource, and should - consider reserved memory instead to enhance system endurance. - Max order should at least satisfied usage by huge page. - config RT_USING_MEMPOOL bool "Using memory pool" default y -- cgit v1.3.1