source:
trunk/libs/newlib/src/libgloss/m68k/fido-sbrk.c
@
612
Last change on this file since 612 was 444, checked in by , 6 years ago | |
---|---|
File size: 275 bytes |
Line | |
---|---|
1 | #include <stddef.h> |
2 | |
3 | extern char _end[]; |
4 | static char *curbrk = _end; |
5 | extern char _heapend; /* End of heap */ |
6 | |
7 | void * |
8 | sbrk (ptrdiff_t incr) |
9 | { |
10 | char *oldbrk = curbrk; |
11 | if (curbrk + incr > &_heapend) |
12 | return (void *) -1; |
13 | curbrk += incr; |
14 | return oldbrk; |
15 | } |
Note: See TracBrowser
for help on using the repository browser.