Want to play around with GC in .NET?

Courtesy of the DOTNET-ROTOR list, I’ve download RMTk, the Rotor Memory management ToolKit, a port of the MMTk toolkit (a Memory Management ToolKit in Java) to the Rotor/SSCLI codebase. According to Andrew Gray’s home page for RMTk,

    A significant part of the project has been completed. MMTk’s null GC, mark-sweep, semi-space and generational mark-sweep algorithms run with SSCLI. The code and information on building and running the port is available. The code is not fully developed, it has not been well tested and significant areas of functionality (for example, support for finalization) are missing.

Not bad. While you’d never use Rotor for a production system (Lord, I hope not, anyway….), learning how the various GC systems work is not only a good educational opportunity, but with the .NET 2.0 release, the CLR has hooks to allow people to write and plug in their own custom GC implementations (it was necessary for Yukon, since SQL Server does all its own memory management for optimizations’ sake), and that would conceivably allow third-parties to plug in new GC implementations for particular reasons. Interesting, wot?

In the meantime, I’m also pulling down the MMTk, which is part of the Jikes RVM (Research Virtual Machine) from IBM. It’s a JVM dedicated solely to research-level topics, and so has Java APIs for lots of JVM-level stuff, like bytecode manipulation and such. Wish it ran on Windows (there’s just Linux/Unix-based releases available, and I’m not brave enough to try and port it), but that’s why God invented Virtual PC, right? 🙂 Jikes RVM looks to be a definite recommended download if you want to play around with JVM internals.