Method and apparatus for facilitating mark-sweep garbage collection with reference counting
Abstract
A method and a system for facilitating garbage collection (GC) operations in a memory-management system that supports both mark-sweep (MS) objects and reference-counted (RC) objects, wherein objects which are frequently modified are classified as MS objects, and objects which are infrequently modified are classified as RC objects. During a marking phase of a GC operation, the system identifies a set of root objects and then marks referents of the root objects. The system then recursively traverses referents of the root objects which are MS objects and while doing so, marks referents of the traversed MS objects. However, if an RC object is encountered during the traversal of an MS object, the system marks the RC object but does not recursively traverse the RC object. In doing so, the system avoids traversing a large number of RC objects which are infrequently modified.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 4 · Forward citations: 6.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method for facilitating garbage collection (GC) in a memory-management system that supports both mark-sweep (MS) objects and reference-counted (RC) objects, wherein both MS objects and RC objects can be marked and have a reference count, the method comprising: during a marking phase of a GC operation in a memory-management system, identifying roots for the GC operation, marking referents of the roots, and recursively traversing referents of the roots which are MS objects and while doing so, marking referents of the traversed MS objects, wherein while recursively traversing referents of the r
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗