Printer Friendly
Dictionary, Encyclopedia and Thesaurus - The Free Dictionary
1,507,341,695 visitors served.
forum mailing list For webmasters
?
New: Language forums
Dictionary/
thesaurus
Medical
dictionary
Legal
dictionary
Financial
dictionary
Acronyms
 
Idioms
Encyclopedia
Wikipedia
encyclopedia
?

garbage collection

   Also found in: Dictionary/thesaurus, Acronyms, Wikipedia 0.02 sec.

garbage collection

A software routine that searches memory for areas of inactive data and instructions in order to reclaim that space for the general memory pool (the heap). Operating systems may or may not provide this feature. For example, Windows does not do automatic garbage collection which requires that the programmer specifically deallocates memory in order to release it.

Move It to Disk or Deallocate
If a program continues to allocate memory for data buffers and eventually exceeds the physical memory capacity, the operating system then has to place parts of the program in virtual memory (on disk) in order to continue, which slows down processing. Deallocating memory after a routine no longer needs it is a tedious task and programmers often forget to do it or do not do it properly. Java performs automatic garbage collection without programmer intervention, which eliminates this coding headache. See dynamic memory allocation, heap and Java.


(programming)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.


How to thank TFD for its existence? Tell a friend about us, add a link to this page, add the site to iGoogle, or visit webmaster's page for free fun content.
?Page tools
Printer friendly
Cite / link
Email
Feedback
? Mentioned in ? References in periodicals archive
 
Common problems from loops and exceptions from threads to garbage collection are reviewed with an eye to identifying and covering the errors which most common trip up .
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.
 
Encyclopedia browser? ? Full browser
 
 
Encyclopedia
?

Disclaimer | Privacy policy | Feedback | Copyright © 2009 Farlex, Inc.
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. Terms of Use.