brk, sbrk - change data segment space allocation
are used to change dynamically the amount of space allocated for the
calling process's data segment. The change is made by resetting the
process's break value. The break value is the address of the first
location beyond the end of the data segment. The amound of allocated
space increases as the break value increases.
sets the break value to
and changes the allocated space accordingly.
bytes to the break value and changes the allocated space accordingly.
can be negative, in which case the amount of allocated space is
will fail without making any change in the allocated space if such a
change would result in more space being allocated than is available
Upon successful completion,
returns a value of 0 and
returns the old break value. Otherwise, a value of -1 is returned and
is set to indicate the error.