From e3c6264068a0e0c812505f4c41591a08b738126e Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Wed, 21 Sep 2016 13:50:58 +0200 Subject: [PATCH] [ion] Remove _liba_heap_start, simply use _heap_start Change-Id: I395762275f3aa1832210dfc3faae9c0eefb91d9e --- ion/src/device/Makefile | 1 - ion/src/device/boot/memory_map.awk | 4 ++-- ion/src/device/heap.c | 5 ----- liba/src/malloc.c | 8 ++++---- 4 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 ion/src/device/heap.c diff --git a/ion/src/device/Makefile b/ion/src/device/Makefile index 374e40ae0..d156a6767 100644 --- a/ion/src/device/Makefile +++ b/ion/src/device/Makefile @@ -3,7 +3,6 @@ objs += $(addprefix ion/src/device/, \ battery.o\ device.o\ display.o\ - heap.o\ keyboard.o\ led.o\ power.o\ diff --git a/ion/src/device/boot/memory_map.awk b/ion/src/device/boot/memory_map.awk index 95851e1d8..80dc45a31 100644 --- a/ion/src/device/boot/memory_map.awk +++ b/ion/src/device/boot/memory_map.awk @@ -2,8 +2,8 @@ /data_section_end_ram/ { data_end = $1 } /bss_section_start_ram/ { bss_start = $1 } /bss_section_end_ram/ { bss_end = $1 } -/liba_heap_start/ { heap_start = $1 } -/liba_heap_end/ { heap_end = $1 } +/heap_start/ { heap_start = $1 } +/heap_end/ { heap_end = $1 } /framebuffer_start/ { framebuffer_start = $1 } /framebuffer_end/ { framebuffer_end = $1 } /stack_start/ { stack_start = $1 } diff --git a/ion/src/device/heap.c b/ion/src/device/heap.c deleted file mode 100644 index 9e61c0bc7..000000000 --- a/ion/src/device/heap.c +++ /dev/null @@ -1,5 +0,0 @@ -extern char _heap_start; -extern char _heap_end; - -char * _liba_heap_start = &_heap_start; -char * _liba_heap_end = &_heap_end; diff --git a/liba/src/malloc.c b/liba/src/malloc.c index 334325f17..dd734b19f 100644 --- a/liba/src/malloc.c +++ b/liba/src/malloc.c @@ -2,8 +2,8 @@ #include #include -extern char * _liba_heap_start; -extern char * _liba_heap_end; +extern char _heap_start; +extern char _heap_end; heap_config_t HeapConfig = { .nHeap = 0 @@ -17,8 +17,8 @@ void * memsys5Realloc(void *pPrior, int nBytes); int memsys5Roundup(int n); static void configure_heap() { - HeapConfig.nHeap = (_liba_heap_end - _liba_heap_start); - HeapConfig.pHeap = _liba_heap_start; + HeapConfig.nHeap = (&_heap_end - &_heap_start); + HeapConfig.pHeap = &_heap_start; HeapConfig.mnReq = 1; HeapConfig.bMemstat = 0; HeapConfig.xLog = 0;