summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2011-01-24 22:10:45 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2011-01-24 22:10:45 +0100
commit250095c7bc783f415b3958b1099216e8953600e7 (patch)
treee649e72f7a9659c1abe7121ef957f15c1aa49610 /os
parenteee119de6a2bd0487e91daf69e7962351e2a3c9c (diff)
The heap needs to be anonymous; adding generic __heap_start and __heap_end symbols. Also marking the beginning and the end of the rom-to-ram sections.
Diffstat (limited to 'os')
-rw-r--r--os/src/sbrk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/src/sbrk.c b/os/src/sbrk.c
index 3c674ba..221c809 100644
--- a/os/src/sbrk.c
+++ b/os/src/sbrk.c
@@ -8,7 +8,7 @@
// Mostly stolen from mbed-freertos
-extern unsigned int __cs3_heap_start, __cs3_heap_end;
+extern unsigned int __heap_start, __heap_end;
/* Low-level bulk RAM allocator -- used by Newlib's Malloc */
void *heap_end = NULL;
@@ -21,7 +21,7 @@ PRIVILEGED_FUNCTION void *_sbrk_r(struct _reent *ptr, ptrdiff_t incr)
/* Initialize on first call */
if (heap_end == NULL)
{
- heap_end = (void *)&__cs3_heap_start;
+ heap_end = (void *)&__heap_start;
}
prev_heap_end = heap_end;
@@ -30,7 +30,7 @@ PRIVILEGED_FUNCTION void *_sbrk_r(struct _reent *ptr, ptrdiff_t incr)
next_heap_end = (void *)((((unsigned int)heap_end + incr) + 7) & ~7);
/* Check if this allocation would exceed the end of the ram - would probably get into the stack first however */
- if (next_heap_end > (void *)&__cs3_heap_end)
+ if (next_heap_end > (void *)&__heap_end)
{
ptr->_errno = ENOMEM;
ret = NULL;