NAME
|
segbrk – change memory allocation |
SYNOPSIS
|
#include <u.h> #include <libc.h> |
DESCRIPTION
|
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.
|
SOURCE
|
/sys/src/libc/9syscall |
SEE ALSO
|
brk(2), segattach(2), segflush(2) /proc/*/segment |
DIAGNOSTICS
|
Sets errstr. Segbrk returns (void*)–1 on error. |
BUGS
| Segbrk is not fully defined or implemented. In particular, it cannot always return the top of bss when called with a zero addr argument. 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). |