Closed Thread
Results 1 to 4 of 4

Thread: Understanding the stack

  1. #1
    RobSoftware is offline Programmer
    Join Date
    Nov 2005
    Posts
    143
    Rep Power
    0

    Understanding the stack

    Can someone explain to me in laymen terms how each language determines which address to use for the memory stack?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    I've got bad news for you: this isn't a language issue, it's a compiler/OS issue. To give you an idea: Linux and Windows handle memory management completely differently. To make matters worse, you have languages like C++ which can be compiled on Linux, Windows, x86 machines, TI-89 calculators, and even on embedded chips that have nothing to do with an OS. With all the different types of memory and environments, it isn't reasonable to expect that you can easily answer that question.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    Lop's Avatar
    Lop
    Lop is offline Speaks fluent binary
    Join Date
    May 2006
    Posts
    1,178
    Rep Power
    30
    So, according to what WingedPanther said, it would be very hard to know how the stack works...... I guess for one language and one OS it may not be that hard, correct?

  5. #4
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    Basicly, the stack is a pool of memory that the program can get access to. Worry about how to issue commands to acquire memory in your language. Each language does it differently.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Generics and the Stack
    By chili5 in forum Java Tutorials
    Replies: 4
    Last Post: 10-14-2011, 03:03 PM
  2. Stack of symbols
    By zhenya in forum C and C++
    Replies: 2
    Last Post: 03-19-2010, 11:19 AM
  3. Stack allocation and stack size
    By mircan in forum C and C++
    Replies: 3
    Last Post: 03-17-2010, 06:53 PM
  4. Getting the size of a Stack in C
    By fantanoice in forum C and C++
    Replies: 4
    Last Post: 11-05-2009, 02:51 AM
  5. ASM 16 bit STACK TUTORIAL
    By JMC31337 in forum Classes and Code Snippets
    Replies: 3
    Last Post: 02-17-2009, 11:52 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts