diff options
Diffstat (limited to 'fw/fe310/bsp/gloss/sys_sbrk.c')
-rw-r--r-- | fw/fe310/bsp/gloss/sys_sbrk.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fw/fe310/bsp/gloss/sys_sbrk.c b/fw/fe310/bsp/gloss/sys_sbrk.c index ce10c90..e789ec1 100644 --- a/fw/fe310/bsp/gloss/sys_sbrk.c +++ b/fw/fe310/bsp/gloss/sys_sbrk.c @@ -6,9 +6,9 @@ * about it. Note that there is no error checking anywhere in this file, users * will simply get the relevant error when actually trying to use the memory * that's been allocated. */ -extern char metal_segment_heap_target_start; -extern char metal_segment_heap_target_end; -static char *brk = &metal_segment_heap_target_start; +extern char __heap_start; +extern char __heap_end; +static char *brk = &__heap_start; int _brk(void *addr) @@ -23,12 +23,12 @@ _sbrk(ptrdiff_t incr) char *old = brk; /* If __heap_size == 0, we can't allocate memory on the heap */ - if(&metal_segment_heap_target_start == &metal_segment_heap_target_end) { + if(&__heap_start == &__heap_end) { return (void *)-1; } /* Don't move the break past the end of the heap */ - if ((brk + incr) <= &metal_segment_heap_target_end) { + if ((brk + incr) <= &__heap_end) { brk += incr; } else { return (void *)-1; |