garbage collection

Also found in: Dictionary, Thesaurus, Medical, 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.
McGraw-Hill Dictionary of Scientific & Technical Terms, 6E, Copyright © 2003 by The McGraw-Hill Companies, Inc.

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.
This article is provided by FOLDOC - Free Online Dictionary of Computing (

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 SSD.
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.
References in periodicals archive ?
* What would be the potential impacts on garbage collection workers?
However, now the civic body have practically shelved the project and going to outsource the garbage collection services to private firms but only for the urban areas of the city.
The present study applies the EVLN framework to explore household response strategies to inadequate sewerage and garbage collection services in Abuja, Nigeria.
The government also announces that temporary landfills have been identified and garbage collection has resumed.
Mayor of Yatta Mousa Makhamra said that two garbage collection trucks that belong to Yatta municipality were seized by the so-called Israeli Civil Administration officers while transporting garbage to a landfill to the east of the town and the drivers were forced to leave.
Garbage collection refers to the process that triggers memory recycling in the event that an Android app finishes using it.
The tenders will entail street cleaning operations as well as garbage collection and transport to public dumps between residential areas one through twelve next to the Ibny Baytak area and the first, second, fifth, sixth and seventh Mehwar neighbourhoods.
It's probably expensive as well, especially if you take into account the propensity of thugs and vandals to burn and wreck skips and the occasional gutted garbage collection truck.
Defaulting landlords were forewarned that their garbage collection would stop if they failed to pay service fees.
The new range features enhanced garbage collection that is not OS dependent, making it a solid upgrade path to extend the life cycle of older client systems.
The new Kingston SSDNow V+100 also has an enhanced 'always-on' garbage collection feature, which cleanses redundant data from the drive to prevent performance degradation and maintains the drive over its life cycle.
Six tenders for the supply of (a) two garbage collection trailers, (b) two 90 Hp agricultural tractors, (c) one water spraying trailer, (d) one 1.5 tons pickup for garbage collection, (e) two garbage collection dump vehicles, also (f) three small sized loaders on rubber wheels to handle garbage.