Good strategy for determining root set in C++
Matthew Campbell <[email protected]> Thu, 13 Apr 2006 08:34:27 -0500
| Newsgroups | gmane.comp.programming.garbage-collection.general |
|---|---|
| Message-ID | <[email protected]> |
Hey guys, Just joined this list recently. I have been tinkering with a conservative GC in C++ in order to learn some of the ins and outs as well as experiment with some of the heap organizational strategies I have been researching. In any case, I have some issues with determining the root set. I have seen several different implementations which attempt to use global statics to identify parts of the data segment and a similar method for getting to the current stack frame. My question is this. Are there any other methods for doing this without having to resort to creating a more intrusive framework? I would like this GC to be plugged in to existing code, therefore, I really do not want to refactor the existing code to use special calls to new, or force objects to inherit from a common base. I will probably take that approach eventually, as I really do not want to end up overriding the global new/delete in the long run. But anyways, do you guys have any suggestions? Or what would be a "typical" way of going about doing this. Thanks! -- ------------------------------------------- Matthew W. Campbell Research Software Engineer Alion Science and Technology, BMH Operation 5365 Robin Hood Road, Suite 100 Norfolk, VA 23513-2416 (757) 857-5670 x287, Fax (757) 857-6781 [email protected] --------------------------------------------