title: Size of stack and heap memory
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap">What and where are the stack and heap?</a>  </p>
  </blockquote>
  
  
  
  <p>With regard to the basic concepts of memory layout in a c program, I understand the that:</p>
  
  <ul>
  <li>The language uses two primary data structures <strong>stack</strong> and <strong>heap</strong>. </li>
  <li>Stack is created to store the local variables and book keeping data of subroutines </li>
  <li>Heap is created to store the dynamically allocated variables of the program</li>
  <li>Heap is of variable length in nature.(Not very sure on stack) </li>
  <li>Normally it is the responsibility of the compiler/Language to request the OS to create these data structures before the execution.</li>
  </ul>
  
  <h3>Questions</h3>
  
  <ul>
  <li>What is the initial size with which a stack/heap is created? and who decides it?</li>
  <li>Wherein physical memory are they are created? I see a general description as <strong><em>"Stack is created  in the top-level-address and the heap at the low-level-address"</em></strong> Please elobarate this </li>
  </ul>