Garbage Collection Question
There was a post about garbage collection today, which is a topic I haven''t actually heard of until now. From what I hear, the idea is that it looks through your program''s memory all the time, and deletes any variables you haven''t deleted that you should? Or, it deletes it at the end? It sounds like it could make for some pretty lazy programming... But, it does sound like it could be cool for debug. Are there any free (possibly opensource) garbage collection libraries out there?
------------------------------
Jonathan Little
invader@hushmail.com
http://www.crosswinds.net/~uselessknowledge
I mentioned that there was a free garabage collection implementation earlier, but I did not mention where it was at. To answer your question, however, it is located at
http://www.hpl.hp.com/personal/Hans_Boehm/gc/
Although I believe that it only comes with source so you might need to compile it yourself, but usually that is not a problem.
Edited by - Ranok on 1/27/00 6:49:01 AM
http://www.hpl.hp.com/personal/Hans_Boehm/gc/
Although I believe that it only comes with source so you might need to compile it yourself, but usually that is not a problem.
Edited by - Ranok on 1/27/00 6:49:01 AM
---Ranok---
Depends on the garbage collection algorithm. Some algorithms work in a separate thread, doing periodic scans of memory checking for orphans. When an orphan is found it''s deleted and/or logged. Others are more agressive and track almost every memory access trying to determine if memory is orphaned. These are IMO more useful in debugging. They also cripple your performance while running, so you almost have to have a two separate debug builds.
Some people for debug like to use basic leak detectors. They just log every memory allocation and deallocation and deallocate ophaned memory upon program termination.
Some people for debug like to use basic leak detectors. They just log every memory allocation and deallocation and deallocate ophaned memory upon program termination.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement