摘要 |
A method to improve object-oriented computer processing by reducing the incidences of object creation and garbage collection. A compiler, preferably of object-oriented language such as Java, identifies a list of objects that are fixed in value or are constant and places those fixed/constant objects in a separate class, a root class, which is loaded at run-time along with all the other classes. Upon creation of an object table, a separate object table may be created for those objects in the root class thereby immunizing the fixed entries from garbage collection and the values will not be erased from memory. Alternatively, the fixed/constant objects can be placed in an object table along with other variable objects but can be marked as active by changing the bit values in a field of the object table. In any event, first objects that are fixed in value are not created each time the object is called; and second, the values of those objects will not be discarded from memory because they are immune from garbage collection by manipulation of object tables or by fields within the object tables.
|