linux brk syscall returns the end pointer so if it fails then the old one if it succeeds then the new one the current implementation of sbrk returns the end of the allocated area instead of the begining i attached a patch that fixes brk and sbrk