×

System and method for garbage collection with ambiguous roots

  • US 4,907,151 A
  • Filed: 09/30/1988
  • Issued: 03/06/1990
  • Est. Priority Date: 09/30/1988
  • Status: Expired due to Term
First Claim
Patent Images

1. A garbage collection method for recovering unused memory in a heap of dynamically allocated storage, the steps of the method comprising:

  • dividing a heap of storage into a multiplicity of pages;

    labelling as allocated pages each page in said heap allocated for storing program objects, and labelling as unallocated pages all other pages of the heap;

    identifying a root set of hints which point directly and indirectly to all of the accessible program objects stored in said heap, said program objects storing additional hints pointing to other ones of said program objects;

    said hints including unambiguous pointers to program objects stored in said heap and ambiguous pointers which may or may not point to program objects stored in said heap;

    labelling as promoted pages, pages labelled as allocated and pointed to by ambiguous pointers in said root set and in said accessible program objects; and

    copying all said accessible program objects, excepting those in promoted pages, to newly allocated pages in said heap;

    said steps of labelling promoted pages and copying including the steps of labelling said promoted pages and newly allocated pages as allocated pages, and labelling all other pages in said heap as unallocated pages.

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