title: How malloc() and sbrk() works in unix?
body: <p>I am new to UNIX, and I am studying some of UNIX system calls such as <code>brk()</code>, <code>sbrk()</code>, and so on....</p>
  
  <p>Last day I have read about <code>malloc()</code> function, and I was confused a little bit!
  Can anybody tell me why malloc reduces the number of <code>sbrk()</code> system calls  that the  program must perform?</p>
  
  <p>And another question, do <code>brk(0)</code>, <code>sbrk(0)</code> and <code>malloc(0)</code> return the same value?</p>