An improved moving garbage collection algorithm is described. The algorithm allows
efficient use of non-temporal stores to reduce the required time for garbage collection.
Non-temporal stores (or copies) are a CPU feature that allows the copy of data
objects within main memory with no interference or pollution of the cache memory.
The live objects copied to new memory locations will not be accessed again in the
near future and therefore need not be copied to cache. This avoids copy operations
and avoids taxing the CPU with cache determinations. In a preferred embodiment,
the algorithm of the present invention exploits the fact that live data objects
will be stored to consecutive new memory locations in order to perform streaming
copies. Since each copy procedure has an associated CPU overhead, the process of
streaming the copies reduces the degradation of system performance and thus reduces
the time for garbage collection.