Войти
  • 10045Просмотров
  • 5 лет назадОпубликованоRichard Habeeb

sbrk/brk System Calls and Optimistic Allocation Explained

A quick, conceptual explanation of the brk/sbrk system calls and how they interact with an optimistic/lazy allocation strategy. int brk(void *addr) - This system call sets a user process's break to a given address. It returns -1 on error. void *sbrk(intptr_t increment) - This system call increments the break, and returns the address of the old (previous) break. On error, (void *) -1 is returned.