Submitted Questions

  • Memory Allocation

    we say stack is allocated to the local variables ,formal arguments and return addresses of a function for manipulating function calls?but the question arises when does the stack allocation to above things take place?at compile time or run time.And by the way what about automatic memory allocation.what is it?

    coolquasar

    • Sep 15th, 2008

    Memory is allocated only during the runtime, and compiler just decides the amount of memory needed by each variable... It just adds the displacement value to be added to the Base Stack pointer for "Local Variables" Allocation.