From 11d54b34a75e9c64aea28dc47c1415c3be609d41 Mon Sep 17 00:00:00 2001 From: wangmingrong1 Date: Wed, 8 Jan 2025 15:38:13 +0800 Subject: [PATCH] Revert "mm_heap: double malloced memory default alignment (4 -> 8, 8 -> 16)" This reverts commit 3e971d2e6d753519985a3e044d4dd21026ec1d12. --- include/nuttx/mm/mm.h | 2 +- mm/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nuttx/mm/mm.h b/include/nuttx/mm/mm.h index 6d40ae11eb..854c54f34c 100644 --- a/include/nuttx/mm/mm.h +++ b/include/nuttx/mm/mm.h @@ -157,7 +157,7 @@ #endif #if CONFIG_MM_DEFAULT_ALIGNMENT == 0 -# define MM_ALIGN (2 * sizeof(uintptr_t)) +# define MM_ALIGN sizeof(uintptr_t) #else # define MM_ALIGN CONFIG_MM_DEFAULT_ALIGNMENT #endif diff --git a/mm/Kconfig b/mm/Kconfig index 6d77d27e3e..356daa2196 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -62,7 +62,7 @@ config MM_KERNEL_HEAPSIZE config MM_DEFAULT_ALIGNMENT int "Memory default alignment in bytes" - default 0 + default 8 range 0 64 ---help--- The memory default alignment in bytes, if this value is 0, the real