From ab2638e9a2ea1c2de5f700d48280bdaf6288ad0c Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 2 Apr 2016 17:08:20 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9225 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/oslib/src/chmemcore.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/os/common/oslib/src/chmemcore.c b/os/common/oslib/src/chmemcore.c index d72bf73bb..fd90ac971 100644 --- a/os/common/oslib/src/chmemcore.c +++ b/os/common/oslib/src/chmemcore.c @@ -82,15 +82,14 @@ void _core_init(void) { extern uint8_t __heap_end__[]; /*lint -save -e9033 [10.8] Required cast operations.*/ - nextmem = (uint8_t *)MEM_ALIGN_NEXT(__heap_base__, PORT_NATURAL_ALIGN); - endmem = (uint8_t *)MEM_ALIGN_PREV(__heap_end__, PORT_NATURAL_ALIGN); + nextmem = __heap_base__; + endmem = __heap_end__; /*lint restore*/ #else - static uint8_t default_heap[MEM_ALIGN_NEXT(CH_CFG_MEMCORE_SIZE, - PORT_NATURAL_ALIGN)]; + static uint8_t static_heap[CH_CFG_MEMCORE_SIZE]; - nextmem = (uint8_t *)MEM_ALIGN_NEXT(default_heap, PORT_NATURAL_ALIGN); - endmem = (uint8_t *)MEM_ALIGN_PREV(default_heap, PORT_NATURAL_ALIGN); + nextmem = &static_heap[0]; + endmem = &static_heap[CH_CFG_MEMCORE_SIZE]; #endif }