IBM User Guide for Java V7 on Windows > IBM SDK for Java > The collector and the allocator

Global garbage collection


Garbage collection is performed when an allocation failure occurs in heap lock allocation, or if a specific call to System.gc() occurs. The thread that has the allocation failure or the System.gc() call takes control and performs the garbage collection.

The first step in garbage collection is to acquire exclusive control on the Virtual machine to prevent any further Java operations. Garbage collection then goes through the three phases:

  1. mark
  2. sweep
  3. compaction (if required)

The IBM Garbage Collector (GC) is a stop-the-world (STW) operation, because all application threads are stopped while the garbage is collected.

A global garbage collection occurs only in exceptional circumstances when using the Balanced Garbage Collection policy. Circumstances that might cause this rare event include:


See

  1. Mark phase
  2. Sweep phase
  3. Compaction phase
  4. Reference objects
  5. Final reference processing
  6. JNI weak reference
  7. Heap expansion
  8. Heap shrinkage


Parent: The collector and the allocator








Error 404 - Not Found

Error 404 - Not Found

The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.