MG4J: Managing Gigabytes for Java