12

Could anyone advice a book (or any other source) that would thoroughly reveal internals of JVM memory management & garbage collection (optimization, work, circular references, pecularities, discussions for various JVM impls...)?

[What I've found so far are separate articles devoted to various aspects but no weighty tome :). Some good materials for Hotspot implementation are here. ]

Thanks a lot for any advice you give.

Max
  • 1,741
  • 3
  • 23
  • 40

5 Answers5

11

HotSpot:

Virtual Machine Garbage Collection Tuning

The Garbage-First Garbage Collector (G1)

HotSpot Garbage Collection

IBM Metronome:

Overview (with informative links on the left sidebar)

bakkal
  • 54,350
  • 12
  • 131
  • 107
6

If you look for a vendor-independent resource revealing and thoroughly describing all the various GC algorithms ever researched/designed, I recommend:

  • The Garbage Collection Handbook - Explains theory and implementation of the main GC research that was there since the first GC algorithm ever designed. References also related research articles where you can find all the nasty details. I really like that book, I think that THIS IS THE BIBLE of all the GC-related research.
Aleš
  • 8,896
  • 8
  • 62
  • 107
4

This is highly vendor dependent and not necessarily shared.

HotSpot is open source and demonstrates directly how it is done. Jikes RVM is a JVM written in Java which might be easier to dive into. JamVM is a tiny JVM written in C which - due to its size - might also be easier to dive into.

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
2

I would suggest to go through the Java Virtual Machine specification.Following is the URL for the same :

http://java.sun.com/docs/books/jvms/second_edition/html/VMSpecTOC.doc.html

This gives you a good generic details about the java virtual machine.

Anil Vishnoi
  • 1,352
  • 3
  • 18
  • 25
  • I had a look at the JVM specification, but all it says about garbage collection is that the implementation of the same is left to the discretion of the JVM implementor, so not to constrain their creativity. – rexford Oct 28 '17 at 09:33
1

Also, take a look at this: http://dave-robinson.net/tuning/jvm_details.html

instantsetsuna
  • 9,183
  • 8
  • 25
  • 28