1. Field of the Invention
The present invention relates to computer systems. More specifically, the present invention relates to a method and an apparatus for efficiently managing objects in a memory-management system that supports both address-referenced objects and identifier-referenced objects and facilitates garbage collection.
2. Related Art
Users of object-oriented programming systems are demanding the ability to scale virtual machines to support larger heap sizes and larger numbers of threads. This allows more objects to be created and stored in the heaps, and allows these objects to be accessed by multiple threads. At the same time, it also requires the computer system to manage these objects more efficiently. For example, the larger heaps require significantly more work during garbage collection operations, which causes longer pause times. It is therefore desirable to provide support for concurrent garbage collection so that when threads using part of the memory are stopped for garbage collection, threads using the rest of the memory can continue to execute.
During garbage collection, objects may be frequently relocated within the memory. Conventionally, an object is referenced by an address. However, recently developed systems allow an object to be referenced by an object identifier (OID). Object relocation operations during garbage collection operations are more efficient in OID-based reference systems than in conventional address-based reference systems. This is because in an OID-based reference system, the location of an object is stored in only one place, an object table entry (OTE). Therefore, only the OTE needs to be updated during relocation of the object. In contrast, an address-based reference system requires all pointers that refer to the object to be updated to point to the new location of the object, which can involve a large amount of work.
Unfortunately, the operations involved in managing OIDs, and the associated OTEs to support an OID-based reference system create a significant amount of overhead. Furthermore, an OID-based reference system is slower than an address-based reference system when allocating new objects, because an OID and a region of free memory need to be found for each newly allocated object.
Hence, what is needed is a method and apparatus for managing objects more efficiently in a memory-management system without the above-described problems.
USPTO Backgrounds
USPTO Backgrounds