sbrk should be wrapped as a critical section