This paper demonstrates a unified and garbage-collector independent way to describe the information required for precise collection. Thereby it is possible to construct, a library that can be used with various garbage collectors, without modifying the code of the library or the collector itself. The library design presented applies the adaptor idiom of generic programming which guarantees no overhead incurred if the library is used with manual allocators or with garbage collectors that do not require programmer cooperation. As an illustration of our approach we provide sample adaptors for Bartlett's and CMM primary collectors. We also show that the Standard Template Library (STL) can be easily modified to become garbage-collector aware.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.