Patent ID: 6594678
Filing Date: 2003-07-15
Classification: G06F,Y10S

Abstract:
A method of creating a mechanism for rearranging a plurality of objects in memory, the plurality of objects being associated with one or more classes, the method comprising:ascertaining a number of accesses in memory of data referenced by fields associated with a selected one of the one or more classes with respect to data referenced by remaining ones of the fields associated with the selected one of the one or more classes; determining a class field order associated with the selected one of the one or more classes from the associated number of accesses, the class field order identifying an order in which fields of the selected one of the one or more classes are to be traversed during garbage collection; repeating the ascertaining and determining steps for each one of the one or more classes; generating a record of the accesses in memory of the fields associated with the one or more classes during execution of a computer application; inserting computer code in the computer application that enables counts indicating a total number of times each path is taken during execution of the computer application to be computed; determining a number of references of each field with respect to other fields within the same one of the classes for each said path; employing the inserted computer code to compute the counts of each said path taken during execution of the computer application; and combining the determined number of references of each field with respect to other fields within the same one of the classes for each said path with the computed counts of each said path taken during execution of the computer application to determine the class field order for the associated class.