9srv Manual Collection/plan9/brk(2) | 9srv Manual Collection/plan9/brk(2) |
---|
int brk(void *addr)
void* sbrk(ulong incr)
In the alternate function sbrk, incr more bytes are added to the program's data space and a pointer to the start of the new area is returned. Rounding occurs as with brk.
When a program begins execution via exec the break is set at the highest location defined by the program and data storage areas. Ordinarily, therefore, only programs with growing data areas need to use brk. A call to sbrk with a zero argument returns the lowest address in the dynamic segment.
The error return from sbrk is (void*)-1.
9srv Manual Collection/plan9/brk(2) | Rev: Sun Dec 02 23:42:17 GMT 2007 |