summaryrefslogtreecommitdiffstatshomepage
path: root/stm/malloc0.c
diff options
context:
space:
mode:
Diffstat (limited to 'stm/malloc0.c')
-rw-r--r--stm/malloc0.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stm/malloc0.c b/stm/malloc0.c
index 55c1ae8044..1b45846e6f 100644
--- a/stm/malloc0.c
+++ b/stm/malloc0.c
@@ -5,7 +5,8 @@ static uint32_t mem = 0;
void *malloc(size_t n) {
if (mem == 0) {
- mem = 0x20008000; // need to use big ram block so we can execute code from it; start up a bit in case that's where bss is...?
+ extern uint32_t _heap_start;
+ mem = &_heap_start; // need to use big ram block so we can execute code from it (is it true that we can't execute from CCM?)
}
void *ptr = (void*)mem;
mem = (mem + n + 3) & (~3);