2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by ashishchoure
0

Is this right to say Heap is RAM and Stack is Pagefile(HardDrive)?

No. Both are RAM-based and both can be swapped into virtual memory if they exceed limits. However, the stack size is not dynamic, so it's less likely to dip into virtual memory than the heap. You can set a stack size at build time that exceeds available physical memory, but that has to be an explicit choice as the defaults are typically more reasonable to avoid thrashing simply by executing a process.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.