From e8f67437d0007a2a4cd5a05afbd525a1960c188c Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 2 Apr 2016 13:05:59 +0000 Subject: Simulator updates, not complete. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9223 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/oslib/src/chmemcore.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'os/common/oslib/src') diff --git a/os/common/oslib/src/chmemcore.c b/os/common/oslib/src/chmemcore.c index af733f395..d72bf73bb 100644 --- a/os/common/oslib/src/chmemcore.c +++ b/os/common/oslib/src/chmemcore.c @@ -86,12 +86,11 @@ void _core_init(void) { endmem = (uint8_t *)MEM_ALIGN_PREV(__heap_end__, PORT_NATURAL_ALIGN); /*lint restore*/ #else - static stkalign_t buffer[MEM_ALIGN_NEXT(CH_CFG_MEMCORE_SIZE) / - PORT_NATURAL_ALIGN]; + static uint8_t default_heap[MEM_ALIGN_NEXT(CH_CFG_MEMCORE_SIZE, + PORT_NATURAL_ALIGN)]; - nextmem = (uint8_t *)&buffer[0]; - endmem = (uint8_t *)&buffer[MEM_ALIGN_NEXT(CH_CFG_MEMCORE_SIZE) / - PORT_NATURAL_ALIGN]; + nextmem = (uint8_t *)MEM_ALIGN_NEXT(default_heap, PORT_NATURAL_ALIGN); + endmem = (uint8_t *)MEM_ALIGN_PREV(default_heap, PORT_NATURAL_ALIGN); #endif } -- cgit v1.2.3