Boost logo

Boost :

From: Achilleas Margaritis (axilmar_at_[hidden])
Date: 2006-05-20 08:28:57


Dear boost developers,

Is there any interest for a small portable garbage collection library? I
have written such a library to use for my personal projects and I would
like to share it with the community, as I think it is very helpful in
developing certain kinds of applications.

Features:

-small (under 2000 LOC)
-portable (no lowlevel OS/CPU/compiler-specific features)
-precise mark & sweep collection
-no dependencies; headers only
-weak pointers
-garbage-collected arrays
-customizable collector with user-defined finalizer and mark functions
-wrapper class for external non-garbage-collected classes
-thread-based collection

"Thread-based collection" means the library can only support
thread-specific collectors. I did not want to introduce dependencies on
specific threading libraries, as they vary from project to project (and
if many threads compete for the same collector, applications tend to
slow down). The library, as it is, provides a collector for the main
thread, but the function that returns the current collector can be
modified to return a thread-specific collector (using
thread-specific-storage).

I have posted an article on www.codeproject.com about it along with the
source code, code documentation and unit tests. It can be found here:

http://www.codeproject.com/useritems/libgc.asp

I have also posted a file release on sourceforge:

http://sourceforge.net/projects/libgc

I have tested the code (so far) in vc++ 7.1, but I think it will work on
GCC and other compilers, as it does not use any O/S-specific and
compiler-specific features.

Even if boost devs find no value in it, I would appreciate any feedback.

Thanks a lot for your attention.

Achilleas Margaritis


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk