wood burning stoves 2.0*
The moose likes Java in General and the fly likes Stack memory and Heap memory in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Stack memory and Heap memory in java" Watch "Stack memory and Heap memory in java" New topic
Author

Stack memory and Heap memory in java

Ramesh Pappala
Ranch Hand

Joined: Sep 14, 2005
Posts: 50
I need complete details about Stack memory and Heap memory in Java.
That means how the instance variables or the objects are going to placed in those memories and all that.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Read this long discussion of exactly this topic. If you read all this and still don't understand, then reply with followup questions.


[Jess in Action][AskingGoodQuestions]
Rick O'Shay
Ranch Hand

Joined: Sep 19, 2004
Posts: 531
http://www.extension.ucsd.edu/studyarea/index.cfm?vAction=singleCourse&vCourse=CSE-40479
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi

I draw this diagram while back..about this memory allocation in JVM process..

http://www.geocities.com/maulin_v/MemoryDiagram.jpg

This might give you more idea. Only thing is the Java Stack box in the diagram attached with the Java thread might be confusing as I have them attached. What I actually wanted to convey there was -- each java thread has its own stack..

Regards
Maulin
 
jQuery in Action, 2nd edition
 
subject: Stack memory and Heap memory in java
 
Similar Threads
Stack & Heap
What is Stack memory & heap memory
JVM memory management
Java array and String problem
When will a variable use memory from stack and when will use memory from heap?