Java memory model articles

Generations in JVM

Generational garbage collection is one of strategies used to automatically remove useless objects from memory. JVM has 2 categories of generations: young and old.

Continue Reading β†’

Reading verbosegc output

When you meet OutOfMemory or another error caused by the memory, you have some ways to debug. If you were persevering, you can use memory dump made with -XX:+HeapDumpOnOutOfMemoryError parameter. If you're even more persevering, you could see how Garbage Collector works thanks to two another JVM arguments: verbose and GC details printing.

Continue Reading β†’

Java memory model

In multi-threading languages as Java, a memory model is mandatory to be able to determine correctly code behavior on concurrent tasks execution.

Continue Reading β†’

String memory management in Java

One of the most used objects in Java is String. This omnipresence makes that String is managed a little bit differently than other objects in Java.

Continue Reading β†’