×

Ephemeral garbage collection using a tracking mechanism on a card table to determine marked bundles

  • US 8,131,955 B2
  • Filed: 04/15/2004
  • Issued: 03/06/2012
  • Est. Priority Date: 04/15/2004
  • Status: Active Grant
First Claim
Patent Images

1. A computer-readable storage medium apparatus having computer-executable instructions encoded thereon to support ephemeral garbage collection by setting a write-watch mechanism to watch specified memory locations, the computer-readable storage medium apparatus being accessible by a computing device, the instructions, upon execution, causing the computing device, during execution of a program, when a statement of the program for execution is obtained, to determine whether the statement includes a store operator, the instructions, upon execution, further causing the computing device to perform operations comprising:

  • during a loop that is performed for at least two iterations based at least on respective store operators;

    storing a value specified in the statement in a memory location specified in the statement;

    determining whether the memory location specified is within an ephemeral generation;

    in an event the memory location specified is within the ephemeral generation, obtaining a next statement of the program for execution; and

    in an event the memory location specified is not within the ephemeral generation, setting a card associated with the memory location specified and obtaining the next statement of the program for execution;

    requesting via the write-watch mechanism a list of memory locations, the list;

    identifying a plurality of the memory locations that have been accessed since a last ephemeral garbage collection process, each memory location corresponding to one of a plurality of cards associated with one or more objects allocated from within a memory heap, each of the plurality of cards associated with a card table, wherein the card table identifies one or more of the plurality of cards with objects that have been accessed; and

    comprising a bitmap, wherein each bit within the bitmap corresponds to one of the plurality of cards, modification of the bitmap occurring when a corresponding bit is set at the time that the card is trimmed to disk;

    creating, during the current ephemeral garbage collection process and responsive to exiting the loop upon encountering a statement lacking a store operator, a bundle table containing entries identifying a plurality of bundles, wherein each of the plurality of bundles identifies groupings of subsets of the plurality of cards;

    marking, outside of the loop including setting the card, during the current ephemeral garbage collection process, two or more of the plurality of bundles identified in the bundle table using the list, wherein the marked bundles identify groupings of subsets of the plurality of marked cards having associated objects that have been accessed since the last ephemeral garbage collection process; and

    performing garbage collection upon at least one accessed object.

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