Fast conservative Garbage collection

Rifat Shahriyar*, Stephen M. Blackburn, Kathryn S. McKinley

*Corresponding author for this work

    Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

    11 Citations (Scopus)

    Abstract

    Garbage collectors are exact or conservative. An exact collector identifies all references precisely and may move referents and update references, whereas a conservative collector treats one or more of stack, register, and heap references as ambiguous. Ambiguous references constrain collectors in two ways. (1) Since they may be pointers, the collectors must retain referents. (2) Since they may be values, the collectors cannot modify them, pinning their referents.

    We explore conservative collectors for managed languages, with ambiguous stacks and registers. We show that for Java benchmarks they retain and pin remarkably few heap objects: <0.01% are falsely retained and 0.03% are pinned. The larger effect is collector design. Prior conservative collectors (1) use mark-sweep and unnecessarily forgo moving all objects, or (2) use mostly copying and pin entire pages. Compared to generational collection, overheads are substantial: 12% and 45% respectively. We introduce high performance conservative Immix and reference counting (RC). Immix is a mark-region collector with fine linegrain pinning and opportunistic copying of unambiguous referents. Deferred RC simply needs an object map to deliver the first conservative RC. We implement six exact collectors and their conservative counterparts. Conservative Immix and RC come within 2 to 3% of their exact counterparts. In particular, conservative RC Immix is slightly faster than a well-tuned exact generational collector. These findings show that for managed languages, conservative collection is compatible with high performance.

    Original languageEnglish
    Title of host publicationProceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA
    PublisherAssociation for Computing Machinery (ACM)
    Pages121-139
    Number of pages19
    ISBN (Electronic)9781450325851
    DOIs
    Publication statusPublished - 15 Oct 2014
    Event2014 ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2014 - Portland, United States
    Duration: 20 Oct 201424 Oct 2014

    Publication series

    NameProceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA

    Conference

    Conference2014 ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2014
    Country/TerritoryUnited States
    CityPortland
    Period20/10/1424/10/14

    Fingerprint

    Dive into the research topics of 'Fast conservative Garbage collection'. Together they form a unique fingerprint.

    Cite this