A garbage collection (GC) system reducing CPU time required for GC without
stopping all Application Program threads for an excessive amount of time.
The GC system frees memory areas corresponding to objects that are no
longer required in an execution procedure of an object-oriented program
including a plurality of threads. The GC system includes a selection unit
operable to select the threads, an examination unit operable to examine
the selected thread by (i) stopping execution of the thread, (ii) finding
an object that is accessible from the thread via an object pointer, (iii)
managing the found object as a non-freeing target, and (iv) resuming
execution of the thread. The GC system also includes a detection unit
operable to manage an object identified by the processing target object
pointer, as a non-freeing target, and a freeing unit operable to free
memory areas corresponding to objects other than the objects that are
non-freeing targets.