Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
2
2329412
  • Project overview
    • Project overview
    • Details
    • Activity
    • Cycle Analytics
  • Issues 14
    • Issues 14
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
  • Catherine Knapp
  • 2329412
  • Issues
  • #10

Closed
Open
Opened Oct 20, 2025 by Catherine Knapp@catherineknapp
  • Report abuse
  • New issue
Report abuse New issue

Understanding Memory Management


Memory management is the technique of allocating new objects and eradicating unused objects to make house for these new object allocations. This section presents some basic memory administration ideas and explains the basics about object allocation and rubbish collection in the Oracle JRockit JVM. For details about how to use command line options to tune the memory management system, see Tuning the Memory Management System. Java objects reside in an area known as the heap. The heap is created when the JVM begins up and should improve or lower in measurement whereas the applying runs. When the heap becomes full, rubbish is collected. Throughout the garbage collection objects which can be no longer used are cleared, thus making space for new objects. Observe that the JVM uses more memory than just the heap. For instance Java strategies, thread stacks and native handles are allocated in memory separate from the heap, in addition to JVM inside data constructions.


The heap is typically divided into two areas (or generations) referred to as the nursery (or younger area) and the old space. The nursery is a part of the heap reserved for allocation of recent objects. When the nursery turns into full, rubbish is collected by operating a particular young collection, where all objects that have lived lengthy enough within the nursery are promoted (moved) to the previous house, thus freeing up the nursery for extra object allocation. When the old space becomes full garbage is collected there, a process known as an previous collection. The reasoning behind a nursery is that the majority objects are temporary and brief lived. A younger assortment is designed to be swift at finding newly allotted objects which can be nonetheless alive and moving them away from the nursery. Sometimes, a young assortment frees a given quantity of memory much faster than an previous assortment or a rubbish collection of a single-generational heap (a heap with out a nursery). In R27.2.0 and later releases, a part of the nursery is reserved as a keep area.


The keep space contains essentially the most just lately allocated objects in the nursery and is not rubbish collected until the following younger assortment. This prevents objects from being promoted just because they have been allotted proper earlier than a young assortment started. During object allocation, the JRockit JVM distinguishes between small and large objects. The restrict for when an object is taken into account massive depends on the JVM version, the heap size, the garbage collection technique and the platform used, but is usually somewhere between 2 and 128 kB. Please see the documentation for -XXtlaSize and -XXlargeObjectLimit for extra information. Small objects are allotted in thread local areas (TLAs). The thread local areas are free chunks reserved from the heap and MemoryWave Official given to a Java thread for unique use. The thread can then allocate objects in its TLA without synchronizing with other threads. When the TLA becomes full, Memory Wave the thread simply requests a brand new TLA.


The TLAs are reserved from the nursery if such exists, otherwise they are reserved anyplace within the heap. Large objects that don’t match inside a TLA are allotted directly on the heap. When a nursery is used, the massive objects are allotted instantly in previous area. Allocation of massive objects requires extra synchronization between the Java threads, although the JRockit JVM makes use of a system of caches of free chunks of various sizes to cut back the necessity for synchronization and enhance the allocation velocity. Garbage assortment is the strategy of freeing space within the heap or the nursery for allocation of latest objects. This part describes the garbage assortment in the JRockit JVM. The JRockit JVM makes use of the mark and sweep rubbish collection model for performing garbage collections of the whole heap. A mark and sweep garbage collection consists of two phases, the mark part and the sweep part. In the course of the mark section all objects which can be reachable from Java threads, native handles and different root sources are marked as alive, MemoryWave Official as well because the objects which are reachable from these objects and Memory Wave so forth.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: catherineknapp/2329412#10