Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Stack / Heap
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 01 August 2003 :  05:37:47  Show Profile  Visit Azaniah's Homepage
Where can I get an idiots guide to Stack / Heap, how they are used etc...

"trying" to learn some new stuff here - but I'm confused

Cheers Az

Eagles fly!, but weasels don't get sucked into jet engines.

jfitz
Junior Member

USA
345 Posts

Posted - 01 August 2003 :  16:53:05  Show Profile
There are two sets of definitions for each that you will need to keep in mind.

I. Both stacks and heaps are specific types of memory structures used in data structure design. They are frequently implemented and manipulated as objects within a program.

II. From an operating system and program execution perspective (this is a WinTel-centric discussion), the combination of stack and heap represent the free memory available to your executing program. The stack is used for return address storage, parameter passing and allocation of temporary variables during function calls as your program executes. The heap is used for data structure and object allocation during run-time. The stack and the heap grow towards each other during program execution and when they collide, you are out of memory.

Check any computer science book on parameter passing or calling conventions. The later editions of Delphi have dropped this level of memory management discussion from their printed documentation, but if you can get hold of the Delphi 3 Object Pascal Language Guide, there are a couple of chapters (18 and 19) that give a pretty good overview of the topic.

--Jördan
It's a wasted day if you don't spend at least part of it flying upside down.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07