skip to main content
10.1145/3546918.3560824acmotherconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
abstract

Performance Optimizations in the.NET GC (Keynote)

Published:30 November 2022Publication History

ABSTRACT

In this talk we will look at a few interesting optimizations done in the.NET GC. One of the.NET GC’s principles is to separate mechanisms from policies which allows for much more dynamic tuning decisions. We will also use these optimizations to illustrate this principle.

How does the.NET GC organize its objects on the heap when processing them during various GC phases? It groups adjacent live objects into what’s called plugs and uses dead objects inbetween them, called gaps, to store necessary info to facilitate relocation. Special handling is done for pinned objects. Dead spaces inbetween pinned plugs which are threaded onto a free list can get used sooner to satisfy allocation requests by a mechanism called demotion. And we can decide if we want to make them available sooner by separating mechanisms from policies.

The GC can also make a decision whether it’s more productive to do a compacting or sweeping GC after calculating the relocation information (another example of separating mechanisms from policies). If it turns out to be a sweeping GC, the allocations done in the free list of the older generation will need to be repaired. We repair this by an UNDO field on each free list item and keeping a count on the original free list item we took off for allocation, and we only need to repair that many when threading back the items whose UNDO field was touched.

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • Published in

    cover image ACM Other conferences
    MPLR '22: Proceedings of the 19th International Conference on Managed Programming Languages and Runtimes
    September 2022
    161 pages
    ISBN:9781450396967
    DOI:10.1145/3546918

    Copyright © 2022 Owner/Author

    Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 30 November 2022

    Check for updates

    Qualifiers

    • abstract
    • Research
    • Refereed limited
  • Article Metrics

    • Downloads (Last 12 months)7
    • Downloads (Last 6 weeks)0

    Other Metrics

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format .

View HTML Format