GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes Difference b/w Heap and Pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Difference b/w Heap and Pool" Watch "Difference b/w Heap and Pool" New topic
Author

Difference b/w Heap and Pool

Noorulain Khan
Greenhorn

Joined: Jul 31, 2001
Posts: 28
Could any one can explain that what are heap and pool and difference between them
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Thius has been discussed several times. use the search facility to search this forum for those keywords.

Bosun


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Noorulain Khan
Greenhorn

Joined: Jul 31, 2001
Posts: 28
Thanks for your reply. But I couldnt find any search section in this site.
Sadaf Zaidi
Greenhorn

Joined: Oct 09, 2001
Posts: 29
Heap:
The heap is just the area of RAM that is allotted to the JVM by the operating system for runtime activity. As such it is the place that objects get created during a JVM session.
From the Java Virtual Machine Specification
Pool:
The 'pool' is just a special area of memory that Java sets up to store all String literals. Imagine a box with a partition wall; on one side is the 'pool' on the other side the 'heap'. Everytime you use a string literal, it gets stored on the pool side, regular objects get stored on the heap side.
Hope it helps.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Look at the top of this page. Under the "post Reply" button are some links. One of them is the search facility.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Noorulain Khan
Greenhorn

Joined: Jul 31, 2001
Posts: 28
Thanks so much Cindy. It is now clear on me.
 
GeeCON Prague 2014
 
subject: Difference b/w Heap and Pool