1

Possible Duplicate:
What and where are the stack and heap

Where is heap memory and stack memory stored?I mean where on the harddisk?what are the limits of their size?

trincot
  • 317,000
  • 35
  • 244
  • 286
  • 3
    Duplicate of dozens of other questions here, including [What and where are the stack and heap](http://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap). For the record, the stack is never stored on the hard disk, and (some) data on the heap is only stored on disk in the pagefile when the OS decides to page it out of memory. – Daniel Pryden Aug 12 '10 at 16:28
  • 2
    there are in RAM, not on hard disk – Andrey Aug 12 '10 at 16:30

2 Answers2

5

You should consider memory and hard-disk as opposites.

Memory is the more expensive stuff that comes in sticks and is 1000x faster than hard disk.

I don't think you'll be able to "find" the heap and stack memory the way you want to. The OS sets this up by assigning some range of memory for each ( like 0x682CFF00 - 0x681CFF00 ).

bukzor
  • 37,539
  • 11
  • 77
  • 111
4

Perhaps this discussion will help What and where are the stack and heap?

Community
  • 1
  • 1
Ashley Grenon
  • 9,305
  • 4
  • 41
  • 54