sriram sundararajan wrote:1. Where is stack and Heap are located in the PC or in a server?
sriram sundararajan wrote:2. Is stack is common to all the program language? Say i have Java and C++ in my machine, so both share the same Stack?
Well, a compiler probably doesn't use a stack or heap at all. Each language may have a different way of organizing a stack or heap. And there can easily be more than one stack or heap per language, as I discussed above.
sriram sundararajan wrote:3. I read, Heap is inside the JVM and it has three major parts or generations, so can i say each language or compiler will have different Heap altogether?
sriram sundararajan wrote:4. In java program, how can i say a particular code is going to stack and a particular code is going to Heap?
Danger, 10,000 volts, very electic .... tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton