Implementing a Garbage Collector for C++
Maxime Chevalier-Boisvert <[email protected]> Thu, 27 Aug 2009 18:13:07 -0400
| Newsgroups | gmane.comp.programming.garbage-collection.general |
|---|---|
| Message-ID | <[email protected]> |
Hello, I'm interested in writing a generational garbage collector in C++. This is for a Python-like programming language implementation project. I have used Boehm's garbage collector before, but I'm worried that it will have noticeable pause times (unacceptable for interactive programs). Since I can't really find any other C++ established GCs out there, I have been thinking of simply writing my own. However, there are two essential ingredients I need for this: - Some kind of write barrier mechanism that will notify my collector when something is written to a part of the heap - A way for me to know the addresses and sizes of the stack, heap and global storage (the root sets) Would anyone happen to know how to implement write barriers (and how to get the stack, heap and global storage information) on the Linux platform <http://www.linuxquestions.org/questions/#>? As an alternative, if you know of C++ GCs other than Boehm, I would also be interested. - Maxime