Heap
The Java virtual machine heap is the area of memory used by the JVM, specifically HotSpot, for dynamic memory allocation. The heap is divided into generations:
- The young generation stores short-lived objects that are created and immediately garbage collected.
- Objects that persist longer are moved to the old generation (also called the tenured generation).
- The permanent generation (or permgen) is used for class definitions and associated metadata.
Originally there was no permanent generation, and objects and classes were stored together in the same area. But as class unloading occurs much more rarely than objects are collected, moving class structures to a specific area allows significant performance improvements.
Read more about this topic: Java Virtual Machine
Famous quotes containing the word heap:
“Squalor spreads its hideous length
through the carts and the asses feet,
squalor coils and reopens
and creeps under barrow
and heap of refuse....”
—Hilda Doolittle (18861961)
“A heap of epithets is poor praise: the praise lies in the facts, and in the way of telling them.”
—Jean De La Bruyère (16451696)
“But generally speaking philistinism presupposes a certain advanced state of civilization where throughout the ages certain traditions have accumulated in a heap and have started to stink.”
—Vladimir Nabokov (18991977)