Method and apparatus for dynamic incremental defragmentation of memory
Abstract
A garbage collection process for managing a memory includes a defragmentation cycle. The garbage collection process is interleaved with a running application on a time-based or work-based schedule. The memory is divided into pages which are further divided into blocks falling into one of a number of block size classes. Objects that were not used by applications during the last garbage collection phase are marked. Objects that were used are moved from pages containing the least live objects to pages containing the most live objects. Objects of the largest block size classes are moved first and objects of the smallest block size class are moved last. The garbage collection interval can be selected to satisfy desired CPU utilization or memory overhead requirements.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 17 · Forward citations: 10.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method of defragmenting a memory heap arranged into a series of pages, the method comprising: dividing the pages of the memory heap into a series of blocks of different size classes; selecting a size of the blocks to limit an amount of internal fragmentation; determining that a number of empty pages of memory has fallen below a threshold number of empty pages of memory; marking objects in the memory heap that were not used during a previous garbage collection cycle as dead objects; marking objects in the memory heap that were used during the previous garbage collection cycle as live objects;
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (10 of 10 total)
References Cited — Backward Prior Art (17)
Non-Patent Literature (5)
- "Trading Data Space for Reduced Time and Code Space in Real-Time Garbage Collection on Stock Hardware", by Rodney Brooks, pp. 256-262.
- A Real-time Garbage Collector with Low Overhead and Consistent Utilization, Bacon et al. Published: POPL'03, Jan. 15-17, 2003, ACM 1-58113-628-5/03/0001, pp. 285-298.
- Controlling Fragmentation and Space Consumption in the Metronome, a Real-time Garbage Collector for Java, by Bacon et al. Published, LCTES'03 Jun. 11-13, 2003, ACM 1-58113-647-1/03/0006, pp. 1-12.
- Maintaining Windows 2002 Peak Performance Through Defragmentation, Microsoft TechNet, pp. 1-7.
- Memory fragmentation in buddy methods for dynamic storage allocation. Allan G. Bromley (Acta Informatica, ISSN: 0001-5903/80/0014/0107, pp. 107-117, 1980).