×

Incremental, multi-area, generational, copying garbage collector for use in a virtual address space

  • US 4,797,810 A
  • Filed: 06/26/1986
  • Issued: 01/10/1989
  • Est. Priority Date: 06/26/1986
  • Status: Expired due to Term
First Claim
Patent Images

1. A method for managing a virtual memory of a computer system, such virtual memory having a main memory and a backing store, and a plurality of virtual pages in each of the main memory and the backing store, comprising the steps of:

  • (a) dividing the virtual memory into at least two areas, each area containing a plurality of pages, and capable of storing a plurality of objects;

    (b) dividing each area into at least two generations, each generation containing a plurality of pages, and capable of storing a plurality of objects, wherein the generations in each area are ordered from youngest to oldest, with an older generation containing objects which have survived more garbage collection processes than those contained in a younger generation;

    (c) for each generation within each area, providing a first trouble pointers data structure which identifies the locations of trouble pointers for that generation, wherein a trouble pointer is considered to be (1) a pointer from within the same area but originating from an older generation, or (2) a pointer originating from another area;

    (d) providing a second trouble pointers data structure which indicates, for each page currently located in the main memory, whether that page has contained, since such page was last loaded into the main memory, any pointers which are trouble pointers for another generation or area;

    (e) whenever a page is copied into the main memory from the backing store, scanning such page for pointers to other areas or younger generations within the same area, whereby any pointers so found are trouble pointers;

    (f) for each page in which trouble pointers are found in step (e), providing a trouble pointers page-in list containing all trouble pointers which were found in step (e);

    (g) whenever a page is copied from the main memory to the backing store, scanning such page for trouble pointers as in step (e), and comparing any trouble pointers so found with the trouble pointers page-in list provided in step (f);

    (h) whenever step (g) indicates that a page being written to the backing store has different trouble pointers that when that page was copied into the main memory, updating the first trouble pointers data structures of the generations, which are referenced by those trouble pointers which have been changed; and

    (i) periodically performing garbage collection on generations within areas, wherein each such generation has a root set which includes all trouble pointers into that generation as defined by the corresponding first trouble pointers data structure, and wherein all pages which are indicated by the second trouble pointers data structure as having contained trouble pointers are scanned for trouble pointers which point to the generation being collected, with any such pointers being included in the root set thereof.

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