Claims
- 1. An apparatus, comprising:
a computer readable memory having memory blocks with a block value; a memory manager; and a garbage collector that can be operated in such a manner to obtain a block snapshot of allocated memory blocks in computer memory from the memory manager, to obtain a root snapshot of all existing roots in the computer memory from system data, to mark the allocated blocks and the existing roots with the block value of garbage blocks, to mark all blocks of computer memory referenced from the root snapshot with the block value of live blocks concurrently while application threads are executing, and to free only the garbage blocks of computer memory within the block snapshot.
- 2. The apparatus of claim 1, wherein the block value is represented by two bits associated with the memory block.
- 3. The apparatus of claim 2, wherein the garbage blocks are represented by a block value of “00.”
- 4. The apparatus of claim 2, wherein the live blocks are represented by a block value of either “10” or “11.”
- 5. The apparatus of claim 4, wherein the apparatus is a portable wireless device.
- 6. The apparatus of claim 5, wherein the system data is generated through the use of a Java virtual machine.
- 7. A memory reclamation method, for reclaiming memory blocks with a block value, comprising:
obtaining a snapshot of allocated blocks in computer memory, resulting in a block snapshot; obtaining a snapshot of all existing roots in the computer memory from system data, resulting in a root snapshot; marking the allocated blocks and the existing roots with the block value of garbage blocks; marking all blocks of computer memory referenced from the root snapshot with the block value of live blocks concurrently while application threads are executing; freeing only the garbage blocks of computer memory within the block snapshot.
- 8. The memory reclamation method of claim 7, the marking of all blocks of computer memory referenced from the root snapshot as live further comprises:
(a) examining a single allocated block in the block snapshot; (b) marking the single allocated block with the block value of a live block, when the single allocated block is referenced from the root snapshot; (c) repeating (a) and (b) until all the allocated blocks in the block snapshot are examined.
- 9. The memory reclamation method of claim 8, wherein the marking of the single allocated block as a live block, when the single allocated block is referenced from the root snapshot, is accomplished through greying the block value.
- 10. The memory reclamation method of claim 9, wherein greying the block value is accomplished through an OR operation between the block value and 1.
- 11. A memory reclamation method, comprising:
obtaining a snapshot of allocated blocks in computer memory, resulting in a block snapshot; obtaining a snapshot of all existing roots in the computer memory from system data, resulting in a root snapshot; marking all blocks of computer memory referenced directly or indirectly from the root snapshot concurrently while application threads are executing; sweeping only the unmarked blocks of computer memory within the block snapshot.
- 12. A computer-readable medium encoded with data and instructions, such that when read by a computing device, the computing device is caused to:
obtain a snapshot of allocated blocks in computer memory, resulting in a block snapshot; obtain a snapshot of all existing roots in the computer memory from system data, resulting in a root snapshot; mark the allocated blocks and the existing roots with the block value of garbage blocks; mark all blocks of computer memory referenced from the root snapshot with the block value of live blocks concurrently while application threads are executing; free only the garbage blocks of computer memory within the block snapshot.
- 13. The computer-readable medium of claim 12, wherein the marking of all blocks of computer memory referenced from the root snapshot as live further comprises:
(a) examining a single allocated block in the block snapshot; (b) marking the single allocated block with the block value of a live block, when the single allocated block is referenced from the root snapshot; (c) repeating (a) and (b) until all the allocated blocks in the block snapshot are examined.
- 14. The computer-readable medium of claim 13, wherein the marking of the single allocated block as a live block, when the single allocated block is referenced from the root snapshot, is accomplished through greying the block value.
- 15. The computer-readable medium of claim 14, wherein greying the block value is accomplished through an OR operation between the block value and 1.
- 16. A computer-readable medium encoded with data and instructions, such that when read by a computing device, the computing device is caused to:
obtain a snapshot of allocated blocks in computer memory, resulting in a block snapshot; obtain a snapshot of all existing roots in the computer memory from system data, resulting in a root snapshot; mark all blocks of computer memory referenced directly or indirectly from the root snapshot concurrently while application threads are executing; sweep only the unmarked blocks of computer memory within the block snapshot.
- 17. An apparatus, comprising:
means for obtaining a snapshot of allocated blocks in computer memory, resulting in a block snapshot; means for obtaining a snapshot of all existing roots in the computer memory from system data, resulting in a root snapshot; means for marking all blocks of computer memory referenced directly or indirectly from the root snapshot concurrently while application threads are executing; means for sweeping only the unmarked blocks of computer memory within the block snapshot.
- 18. An apparatus, comprising:
means for obtaining a snapshot of allocated blocks in computer memory, resulting in a block snapshot; means for obtaining a snapshot of all existing roots in the computer memory from system data, resulting in a root snapshot; means for marking the allocated blocks and the existing roots with the block value of garbage blocks; means for marking all blocks of computer memory referenced from the root snapshot with the block value of live blocks concurrently while application threads are executing; means for freeing only the garbage blocks of computer memory within the block snapshot.
- 19. The apparatus of claim 18, the means for marking of all blocks of computer memory referenced from the root snapshot as live further comprising:
(a) means for examining a single allocated block in the block snapshot; (b) means for marking the single allocated block with the block value of a live block, when the single allocated block is referenced from the root snapshot; (c) means for repeating (a) and (b) until all the allocated blocks in the block snapshot are examined.
- 20. The apparatus of claim 19, wherein the marking of the single allocated block as a live block, when the single allocated block is referenced from the root snapshot, is accomplished through greying the block value.
RELATED APPLICATIONS
[0001] This application claims the benefit of co-pending U.S. Provisional Application Serial No. 60/227,872 filed Aug. 25, 2000.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60227872 |
Aug 2000 |
US |