brk, sbrk – change memory allocation
int brk(void *addr)
void* sbrk(ulong incr)
sets the system’s idea of the lowest bss location not used by the program
(called the break)
rounded up to the next multiple of 8 bytes.
Locations not less than
and below the stack pointer
may cause a memory violation if accessed.
In the alternate function
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
When a program begins execution via
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
A call to
with a zero argument returns the lowest address
in the dynamic segment.
These functions set
The error return from