URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [sys/] [sysvi386/] [sbrk.c] - Rev 262
Go to most recent revision | Compare with Previous | Blame | View Log
extern end; static void *curbrk = (char*)&end; void * sbrk(incr) int incr; { extern int errno; extern int _brk(void *); void *ptr = curbrk; int t; if (incr == 0) return curbrk; t = _brk (curbrk + incr); if (t == -1 && errno) return (void *)-1; curbrk = ((char *)curbrk) + incr; return ptr; }
Go to most recent revision | Compare with Previous | Blame | View Log