• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stack memory and Heap memory in java  RSS feed

 
Ramesh Pappala
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this long discussion of exactly this topic. If you read all this and still don't understand, then reply with followup questions.
 
Rick O'Shay
Ranch Hand
Posts: 531
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!