×

Garbage collection system and method for locating root set pointers in method activation records

  • US 5,848,423 A
  • Filed: 04/23/1997
  • Issued: 12/08/1998
  • Est. Priority Date: 04/23/1997
  • Status: Expired due to Term
First Claim
Patent Images

1. A method of operating a computer system so as to efficiently locate root set object references for garbage collection of inaccessible objects in the computer system'"'"'s memory, comprising the steps of:

  • loading an object class having a plurality of methods into the computer system'"'"'s memory;

    each method of the loaded object class having an associated activation record;

    an instance of which is stored on a program stack in the each method'"'"'s activation record including a unique identifier associated with the method and zero or more parameters, each of the parameters having an associated data type and location in the activation record that is defined by the loaded object class;

    wherein a subset of the parameters in the activation records for the methods in the loaded object class are object references having an object reference data type;

    while performing the loading step,associating each method in the loaded class file with an entry in a table; and

    storing in the table data for each method in the loaded class file, at the associated entry for the method, the stored data indicating where each of the object references, if any, are located in the activation record for the method;

    executing a mutator task that stores objects in the computer system'"'"'s memory;

    storing on a program stack an instance of the activation record for each method invoked by the mutator task; and

    performing garbage collection on objects in memory, including scanning the activation records stored in the program stack to identify object references therein, including processing each activation record in the program stack by;

    locating the entry in the table that corresponds to the activation record being processed; and

    identifying each of the object references in the activation record being processed in accordance with the data stored in the located table entry, whereby objects stored in memory are efficiently identified from parameters in the activation records stored in the program stack.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×