David Ungar, Generation Scavenging: A non-disruptive high performance storage reclamation algorithm. Proceedings of the first ACM SIGSOFT/SIGPLAN software engineering symposium on Practical Software Development Environments (SDE 1), 1984, pp. 157-167.It is very small and rather fast. Benchmarks that allocate objects almost as fast as possible typically spend less than half their time in garbage collection. On my seven-year-old Mac G5 it can allocate and collect 300 MB per second; on a recent Xeon it's well over ½ GB per second.
Download the source code: gsgc-1.0.tar.gzA test program gsgc-test is included that exercises the allocator and collector. See the Makefile for details. Full documentation of the API is included in the file ReadMe.html, reproduced below.
Browse the source code: gsgc-1.0
gsgc is distributed under the MIT license. It will not infect your project with a contagious disease if you decide to use and/or modify it.
If you fix any bugs, please send your fixes to Ian Piumarta by email
at 'first-name at last-name dot com'. Thanks!