Last change
on this file since 612 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
275 bytes
|
Rev | Line | |
---|
[444] | 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.