4

Below is a part of the hs_err_pid

Heap
 PSYoungGen      total 13888K, used 9807K [0x8a330000, 0x8b140000, 0x914f0000)
  eden space 13504K, 69% used [0x8a330000,0x8ac67710,0x8b060000)
  from space 384K, 96% used [0x8b0e0000,0x8b13c6e0,0x8b140000)
  to   space 448K, 0% used [0x8b060000,0x8b060000,0x8b0d0000)
 PSOldGen        total 115456K, used 57684K [0x514f0000, 0x585b0000, 0x8a330000)
  object space 115456K, 49% used [0x514f0000,0x54d451c0,0x585b0000)
 PSPermGen       total 16384K, used 11253K [0x4d4f0000, 0x4e4f0000, 0x514f0000)
  object space 16384K, 68% used [0x4d4f0000,0x4dfed618,0x4e4f0000)

What are

  1. PSYoungGen
  2. eden space (from space, to space)
  3. PSOldGen
  4. PSPermGen (object space)
Erick Robertson
  • 32,125
  • 13
  • 69
  • 98
Geek
  • 23,089
  • 20
  • 71
  • 85

3 Answers3

5

Heap memory is organized into different generations.

Default Arrangement of Generations, Except for Parallel Collector and G1

1. Young Generation : Mostly all new objects are created in Young Generation initially. This generation is divided into two areas, namely Eden space and Survivor space. Survivor space is further divided into two areas Survivor0 and Survivor1. All new Objects are initially created in Eden Space and survivor spaces are mainly used while having minor garbage collection.

Before every minor collection one Survivor space will be empty (to) and this will used to keep the live objects from eden space or from survivor space for minor collections.

Young Generation Minor Collection 1

For next minor collection it will be vice versa, i.e former from will be to and to will be form.

Young Generation Minor Collection 2

2. Tenured or Old Generation : Objects that lives in the Young Generation for some time (i.e survived a few minor collections) are moved to Old generation.

3. Permanent Generation : This area mainly contains class and methods metadata. Read more here.


    Heap
 PSYoungGen      total 13888K, used 9807K [0x8a330000, 0x8b140000, 0x914f0000)
  eden space 13504K, 69% used [0x8a330000,0x8ac67710,0x8b060000)
  from space 384K, 96% used [0x8b0e0000,0x8b13c6e0,0x8b140000)
  to   space 448K, 0% used [0x8b060000,0x8b060000,0x8b0d0000)
 PSOldGen        total 115456K, used 57684K [0x514f0000, 0x585b0000, 0x8a330000)
  object space 115456K, 49% used [0x514f0000,0x54d451c0,0x585b0000)
 PSPermGen       total 16384K, used 11253K [0x4d4f0000, 0x4e4f0000, 0x514f0000)
  object space 16384K, 68% used [0x4d4f0000,0x4dfed618,0x4e4f0000)

The above is showing the memory usage summary of the different generations in Heap.

Please read this Sun white paper for a clear understanding.

Community
  • 1
  • 1
Somnath Musib
  • 3,548
  • 3
  • 34
  • 47
4

These are the memory regions used by the garbage collector.

See the memory management whitepaper from Sun (PDF) for more details.

seanhodges
  • 17,426
  • 15
  • 71
  • 93
Robert Munteanu
  • 67,031
  • 36
  • 206
  • 278
2

This is your Java HotSpot Garbage Collection source of information.

HotSpot Generations

Memory in the Java HotSpot virtual machine is organized into three generations: a young generation, an old generation, and a permanent generation. Most objects are initially allocated in the young generation. The old generation contains objects that have survived some number of young generation collections, as well as some large objects that may be allocated directly in the old generation. The permanent generation holds objects that the JVM finds convenient to have the garbage collector manage, such as objects describing classes and methods, as well as the classes and methods themselves.

Hubert
  • 2,273
  • 1
  • 19
  • 14