segbrk – change memory allocation|
void* segbrk(void *saddr, void *addr)
Segbrk sets the system's idea of the lowest unused location of
a segment to addr rounded up to the next multiple of a page size,
typically 4096 bytes. The segment is identified by saddr which
may be any valid address within the segment. |
A call to segbrk with a zero addr argument returns the base address of the segment without altering its size.
The system will prevent segments from overlapping and will not
allow the length of the text, data, or stack segment to be altered.
brk(2), segattach(2), segflush(2)|
Sets errstr. Segbrk returns (void*)–1 on error.|
The segbrk system call may go away or be re–implemented to give
more general segment control, subsuming the functions of brk(2),
segflush(2) and segfree in segattach(2).|