摘要 |
One embodiment of the present invention provides a system for compacting memory within a computing device, wherein the computing device supports transient objects, having a persistent portion stored in a writeable non-volatile memory, and a transient portion stored in a volatile memory. During the compaction process, the system resets the volatile memory so that information in the volatile memory is deleted. Next, the system scans through a list of objects. For each transient object encountered in the list of objects, the system allocates space for the transient object in the volatile memory. The system also updates the persistent portion of the transient object, if necessary, to specify a new location in volatile memory for the transient portion of the transient object.
|