This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Websphere and the fly likes JAVA Heap Size vs Java Thread Stack Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "JAVA Heap Size vs Java Thread Stack " Watch "JAVA Heap Size vs Java Thread Stack " New topic
Author

JAVA Heap Size vs Java Thread Stack

Arunkumar Subramaniam
Greenhorn

Joined: Apr 08, 2009
Posts: 8
hi friends

what is the difference and reliationship between jvm heap size and java thread statck memory


Thanks
Arunkumar S
Jeff Storey
Ranch Hand

Joined: Apr 07, 2007
Posts: 230
Hi -

The Java Heap is where objects get created. When you call new Object() (not just java.lang.Object, but any object), it gets created on the heap. When too many objects are on the heap, the JVM tries to garbage collect any unused references. The thread stack deals with methods and their call stacks. When a thread calls a method, it pushes the call onto the stack. If that method calls another method, it gets pushed onto the stack. When the method execution completes, the method call is popped off the stack. A good article on the JVM architecture can be found here http://www.artima.com/insidejvm/ed2/jvm2.html.

Hope this helps,
Jeff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAVA Heap Size vs Java Thread Stack
 
Similar Threads
configuring JVM parameters
SIGSEGV 11 / SIGABRT 6
Out of memory error
JAVA Heap Size vs Java Thread Stack
Memory heap error