Java (JRockit JVM) Memory Management

  • Java objects reside in an area called the heap.
  • The heap is created when the JVM starts up and may increase or decrease in size while the application runs..
  • The heap is divided into two generations called the nursery (or young space) and the old space.
  • During object allocation, the JRockit JVM distinguishes between small and large objects.
  • The limit for when an object is considered large depends on the JVM version (between 2 and 128 kB).
  • Small objects are allocated in thread local areas (TLAs).
  • Large objects are allocated directly in old space
  • Large objects requires more synchronization between the Java threads, although the JRockit JVM uses a system of caches of free chunks of different sizes to reduce the need for synchronization and improve the allocation speed.
  • Garbage Collection is the process of freeing space in the heap or the nursery for allocation of new objects.