Go to the previous, next section.
int brk(void *end_data_segment);
end_data_segment: [in] the new end of the data segment.
brk
sets the end of the data segment to the value specified by
end_data_segment. This value must be greater than the end
of the text segment and lower than 16KB before the end of the stack.
Note: the brk syscall is in never called directly. It is wrapped by a libc function that changes the return value. The sbrk fucntion is also implemented as a wrapper.
Returns the new end of the data segment. (If it is not equal the the requested end, then there has been an error and the memory couldn't be allocated.)
Go to the previous, next section.