This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 05beacc799b2687e445651edf1a0431674c8b4d0 Author: buxiasen <buxia...@xiaomi.com> AuthorDate: Fri Apr 25 19:56:53 2025 +0800 arch/arm/heap: reserved memory for mmu table When using ARCH_PGPOOL_PBASE, always have to reserver mmu table, not be used for kernel heap Signed-off-by: buxiasen <buxia...@xiaomi.com> --- arch/arm/src/common/arm_allocateheap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/src/common/arm_allocateheap.c b/arch/arm/src/common/arm_allocateheap.c index b72191b263..bf501faa6d 100644 --- a/arch/arm/src/common/arm_allocateheap.c +++ b/arch/arm/src/common/arm_allocateheap.c @@ -171,6 +171,10 @@ void weak_function up_allocate_kheap(void **heap_start, size_t *heap_size) uintptr_t base = g_idle_topstack; uintptr_t size = CONFIG_ARCH_PGPOOL_PBASE - g_idle_topstack; + + /* Reserved space for mmu kernel table */ + + size -= PGTABLE_SIZE * CONFIG_SMP_NCPUS; # else /* CONFIG_BUILD_KERNEL && !CONFIG_ARCH_PGPOOL_PBASE */