source: trunk/libs/newlib/src/libgloss/libnosys/sbrk.c @ 480

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

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

File size: 366 bytes
Line 
1/* Version of sbrk for no operating system.  */
2
3#include "config.h"
4#include <_syslist.h>
5
6void *
7_sbrk (incr)
8     int incr;
9{
10   extern char   end; /* Set by linker.  */
11   static char * heap_end;
12   char *        prev_heap_end;
13
14   if (heap_end == 0)
15     heap_end = & end;
16
17   prev_heap_end = heap_end;
18   heap_end += incr;
19
20   return (void *) prev_heap_end;
21}
Note: See TracBrowser for help on using the repository browser.