O'Reilly logo
  • anu latha thinks this is interesting:

Garbage Collection

Garbage collection is the process of freeing up space in the heap by removing unused objects from the heap. JRockit uses a garbage collection model called the mark and sweep model. Under this mode, the JVM first marks the objects reachable from Java threads as active, with the rest of the objects marked as garbage. During the sweep phase, the JVM finds free spaces between objects that are active and makes those spaces available for allocation to new objects.