Garbage Collection

As a piece of software continues to run, it continuously requests segments of memory to use for its own purposes.  It eventually no longer needs some of the memory that it asked for and returns it back to the memory manager.  Sometimes programmers forget to explicitly release used memory back tot he memory manager and none of their program code has any references to the used memory any more.  When this happens, it’s called a “memory leak” and unused memory starts piling up as unavailable.

Garbage collection is the process of a memory manager that occasionally looks for memory that’s been asked for use by programs, granted, and the discarded inappropriately.  The garbage collector then reclaims that memory back to the “free pool” of memory .

Different technologies and operating systems have their own implementation of memory management and of garbage collection.  Microsoft .NET technologies have a garbage collector that runs in its own thread.  It is triggered at unpredictable moments to find and reclaim discarded memory.

Leave a Reply