source: trunk/libs/newlib/src/libgloss/m68k/fido-sbrk.c @ 668

Last change on this file since 668 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 275 bytes
Line 
1#include <stddef.h>
2
3extern char _end[];
4static char *curbrk = _end;
5extern char _heapend;   /* End of heap              */
6
7void *
8sbrk (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.