Claims
- 1. An apparatus, comprising:
a computer readable memory having memory blocks with a block value, the block value being represented by two bits associated with the memory block, where white memory blocks are represented by a block value of “00,” where grey memory blocks are represented by a block value of “01,” where black blocks are represented by a block value of either “10” or “11,” white blocks being memory blocks that have not been reached by a garbage collector while building a graph of reachable nodes starting at roots, grey blocks being memory blocks that have been reached, but where not all of the memory blocks' successor blocks have been reached by the garbage collector while building the graph of reachable nodes starting at the roots, and black blocks being memory blocks and the memory blocks' immediate successor blocks have been reached by the garbage collector while building the graph of reachable nodes starting at the roots.
- 2. The apparatus of claim 1, further comprising:
the garbage collector to grey the block value of a single allocated memory block when the single allocated block is referenced from a root snapshot.
- 3. The apparatus of claim 2, wherein the garbage collector greys the block value through an OR operation between the block value and 1.
- 4. The apparatus of claim 3, wherein the block value is stored as two bits.
- 5. A memory reclamation method, for reclaiming memory blocks with an associated binary block value in a computer memory, comprising:
representing white blocks with the block value of “00,” white blocks being memory blocks that have not been reached by a garbage collector while building a graph of reachable nodes starting at roots; representing grey blocks with the block value of “01,” grey blocks being memory blocks that have been reached, but where not all of the memory blocks' successor blocks have been reached, by the garbage collector while building the graph of reachable nodes starting at the roots; representing black blocks with the block value of either “10” or “11,” black blocks being memory blocks and the memory blocks' immediate successor blocks have been reached by the garbage collector while building the graph of reachable nodes starting at the roots.
- 6. The memory reclamation method of claim 5, further comprising:
greying the block value of a single allocated memory block when the single allocated block is referenced from a root snapshot.
- 7. The memory reclamation method of claim 6, wherein greying the block value is accomplished through an OR operation between the block value and 1.
- 8. The memory reclamation method of claim 7, further comprising:
initially marking the block value of all the blocks as white blocks.
- 9. The memory reclamation method of claim 8, further comprising:
scanning all existing roots in the computer memory, resulting in the block snapshot.
- 10. The memory reclamation method of claim 9, further comprising:
reclaiming the memory blocks marked as white blocks after all the allocated blocks referenced from the root snapshot are greyed.
- 11. The memory reclamation method of claim 10, wherein the binary block value is stored as two bits.
- 12. A computer-readable medium encoded with data and instructions, such that when read by a computing device, the computing device is caused to:
represent white blocks with the block value of “00,” white blocks being memory blocks that have not been reached by a garbage collector while building a graph of reachable nodes starting at roots; represent grey blocks with the block value of “01,” grey blocks being memory blocks that have been reached, but where not all of the memory blocks' successor blocks have been reached, by the garbage collector while building the graph of reachable nodes starting at the roots; represent black blocks with the block value of either “10” or “11,” black blocks being memory blocks and the memory blocks' immediate successor blocks have been reached by the garbage collector while building the graph of reachable nodes starting at the roots.
- 13. The computer-readable medium of claim 12, the instructions further comprising:
greying the block value of a single allocated memory block when the single allocated block is referenced from a root snapshot.
- 14. The computer-readable medium of claim 13, wherein greying the block value is accomplished through an OR operation between the block value and 1.
- 15. The computer-readable medium of claim 14, the instructions further comprising:
initially marking the block value of all the blocks as white blocks.
- 16. The computer-readable medium of claim 15, the instructions further comprising:
scanning all existing roots in the computer memory, resulting in the block snapshot.
- 17. The computer-readable medium of claim 16, the instructions further comprising:
reclaiming the memory blocks marked as white blocks after all the allocated blocks referenced from the root snapshot are greyed.
- 18. The computer-readable medium of claim 17, wherein the binary block value is stored as two bits.
- 19. An apparatus, comprising:
means for representing white blocks with the block value of “00,” white blocks being memory blocks that have not been reached by a garbage collector while building a graph of reachable nodes starting at roots; means for representing grey blocks with the block value of “01,” grey blocks being memory blocks that have been reached, but where not all of the memory blocks' successor blocks have been reached, by the garbage collector while building the graph of reachable nodes starting at the roots; means for representing black blocks with the block value of either “10” or “11,” black blocks being memory blocks and the memory blocks' immediate successor blocks have been reached by the garbage collector while building the graph of reachable nodes starting at the roots.
- 20. The apparatus of claim 19, further comprising:
means for greying the block value of a single allocated memory block when the single allocated block is referenced from a root snapshot.
- 21. The apparatus of claim 20, wherein the means for greying the block value is a processor that calculates an OR operation between the block value and 1.
- 22. The apparatus of claim 21, further comprising:
means for initially marking the block value of all the blocks as white blocks.
- 23. The apparatus of claim 22, further comprising:
means for scanning all existing roots in the computer memory, resulting in the block snapshot.
- 24. The apparatus of claim 23, further comprising:
means for reclaiming the memory blocks marked as white blocks after all the allocated blocks referenced from the root snapshot are greyed.
- 25. The apparatus of claim 24, wherein the binary block value is stored as two bits.
- 26. An computer readable memory comprising:
memory blocks with a block value, the block value being represented by two bits associated with the memory block, where white memory blocks are represented by a block value of “00,” where grey memory blocks are represented by a block value of “01,” where black blocks are represented by a block value of either “10” or “11,” white blocks being memory blocks that have not been reached by a garbage collector while building a graph of reachable nodes starting at roots, grey blocks being memory blocks that have been reached, but where not all of the memory blocks' successor blocks have been reached by the garbage collector while building the graph of reachable nodes starting at the roots, and black blocks being memory blocks and the memory blocks' immediate successor blocks have been reached by the garbage collector while building the graph of reachable nodes starting at the roots.
RELATED APPLICATIONS
[0001] This application claims the benefit of co-pending U.S. Provisional Application Serial No. 60/227,872 filed Aug. 25, 2000 and U.S. Provisional Application Serial No. 60/249,201 filed Nov. 16, 2000.
Provisional Applications (2)
|
Number |
Date |
Country |
|
60227872 |
Aug 2000 |
US |
|
60249201 |
Nov 2000 |
US |