diff --git a/mm/Kconfig b/mm/Kconfig index 71a95c80fa..6d702f7629 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -63,7 +63,7 @@ config MM_KERNEL_HEAPSIZE config MM_DFAULT_ALIGNMENT int "Memory default alignment in bytes" - default 8 + default 0 range 0 64 ---help--- The memory default alignment in bytes, if this value is 0, the real diff --git a/mm/mm_heap/mm.h b/mm/mm_heap/mm.h index adc6f24d28..c787ace6af 100644 --- a/mm/mm_heap/mm.h +++ b/mm/mm_heap/mm.h @@ -111,7 +111,7 @@ #define MM_NNODES (MM_MAX_SHIFT - MM_MIN_SHIFT + 1) #if CONFIG_MM_DFAULT_ALIGNMENT == 0 -# define MM_ALIGN sizeof(uintptr_t) +# define MM_ALIGN (2 * sizeof(uintptr_t)) #else # define MM_ALIGN CONFIG_MM_DFAULT_ALIGNMENT #endif