garbage collection

Also found in: Dictionary, Thesaurus, Medical, Legal, Financial, Acronyms, Wikipedia.

garbage collection

[′gär·bij kə‚lek·shən]
(computer science)
In a computer program with dynamic storage allocation, the automatic process of identifying those memory cells whose contents are no longer useful for the computation in progress and then making them available for some other use.

garbage collection

(GC) The process by which dynamically allocated storage is reclaimed during the execution of a program. The term usually refers to automatic periodic storage reclamation by the garbage collector (part of the run-time system), as opposed to explicit code to free specific blocks of memory.

Automatic garbage collection is usually triggered during memory allocation when the amount free memory falls below some threshold or after a certain number of allocations. Normal execution is suspended and the garbage collector is run. There are many variations on this basic scheme.

Languages like Lisp represent expressions as graphs built from cells which contain pointers and data. These languages use automatic dynamic storage allocation to build expressions. During the evaluation of an expression it is necessary to reclaim space which is used by subexpressions but which is no longer pointed to by anything. This reclaimed memory is returned to the free memory pool for subsequent reallocation.

Without garbage collection the program's memory requirements would increase monotonically throughout execution, possibly exceeding system limits on virtual memory size.

The three main methods are mark-sweep garbage collection, reference counting and copying garbage collection.

See also the AI koan about garbage collection.

garbage collection

(1) Garbage collection is a function of an operating system or programming language that reclaims memory no longer in use. For example, Java and .NET have built-in garbage collection, but C and C++ do not, and programmers have to write the code to allocate and deallocate, which is tedious and error prone. See dynamic memory allocation and memory allocation.

(2) In a flash memory-based solid state drive (SSD), the garbage collection function improves write speed by erasing blocks of unused storage in the background. Flash memory requires blocks to be erased before they can be written, and having empty blocks available saves time when writing new data on the drive. See TRIM support, flash memory and solid state drive.
References in periodicals archive ?
The whole garbage collection process needs restructuring and modernising, with a state-of-the-art incineration plant and collection service.
Kingston's new SSDNow V+100 Series also enables a great 'straddling' of operating systems; its compatibility (including the garbage collection feature) with both XP and Windows 7, means that users can enjoy the immediate benefits of cost-effective performance improvements for their XP systems and/or as they move to Windows 7.
4 with support for concurrent multi-processor garbage collection technology.
The Aonix PERC Ultra Java VM, for example, performs garbage collection in real time.
Adding to the cost of trash pick-up could also induce some people to drop their garbage collection service, resulting in increased roadside dumping and other nuisances.
According to the company, PERC Ultra SMP garbage collection will reclaim all dead memory, defragmenting through relocation of live objects in order to coalesce discontiguous free segments.
Stung by complaints from residents, the City Council called Monday for a study of costs related to garbage collection and promised to consult with neighborhood councils before it decides whether to impose a fee that would boost homeowners' trash bills by 233 percent.
The JamaicaVM supports INTEGRITY native threads and inter-process communication, and offers a runtime system for hard realtime applications through the use of the JamaicaVM's realtime garbage collection technology.
released a report in December suggesting that since suspending recycling, the Sanitation Department had reduced its garbage collection runs by less than 2 percent, the New York Times reports.
The burned-out household goods are part of the garbage collection that has piled up 10 meters high over a 5,000-square-meter land lot in the Ishihara district located adjacent to the garbage incinerator operated by Sakai Clean Center, a private garbage processing business.
One dumpster diver drove around affluent neighborhoods on garbage collection day.