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:
“Now they heap the funeral pyre,
And the torch of death they light;
Ah! tis hard to die by fire!”
—William Makepeace Thackeray (18111863)
“Civilisationa heap of rubble scavenged by scrawny English Lit. vultures.”
—Malcolm Muggeridge (19031990)
“Mortality, behold, and fear,
What a change of flesh is here!
Think how many royal bones
Sleep within this heap of stones,
Hence removed from beds of ease,
Dainty fare, and what might please,”
—Francis Beaumont (1584-1616)