SoftGC is a project mainly written in Java, it's free.
Application-layer garbage collection for Java
Download the jar here: http://p120ph37.github.com/SoftGC/SoftGC.jar
Read the javadocs online here: http://p120ph37.github.com/SoftGC/doc/
Browse the source here: https://github.com/p120ph37/SoftGC
Read the demo code here: https://github.com/p120ph37/SoftGC/blob/master/src/com/awirtz/softgc/Demo.java
Checkout the repo like this: git clone [email protected]:p120ph37/SoftGC.git SoftGC
Run the demo like this: ant demo