1. A system comprising: a memory which stores plural objects and is divided into plural pages, a page in said plural pages comprising a relocation base table (RBT) which is allocated at startup time based on a maximum heap size; and a processor for executing a collector program to perform collection on said plural objects by: encoding a class pointer of an object header for an object of said plural objects with a class index which comprises a class page table index and a class page offset and storing said class pointer in class page table; storing a relocation address for a first live object of said plural objects in the relocation base table (RBT), and storing a relocation offset in the object header, the relocation address for said object being given as a sum of a relocation base address for said object plus said relocation offset; and storing a hashcode of said object in a mashtable which maintains a mapping of said plural objects to hashcode values which are computed based on a current address for said plural objects, said hashcode values being a hash index of said plural objects into said mashtable, said storing comprising: if an entry is found and a key of the entry is the current address of said object, returning a corresponding value in the mashtable as said hashcode for said object, and if no entry for the object is found in the mashtable, inserting a key/value pair where the key and the value are a current address for said object; wherein after the object in said plural objects is determined to be live, and before any object is relocated, collection is performed on said mashtable such that a reference to a dead object is removed, and a key field for a moved object is undated to a new address and is relocated in the mashtable based on a new hashcode.