{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,2,4]],"date-time":"2026-02-04T21:53:42Z","timestamp":1770242022793,"version":"3.49.0"},"reference-count":32,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","license":[{"start":{"date-parts":[[2024,10,8]],"date-time":"2024-10-08T00:00:00Z","timestamp":1728345600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2024,10,8]]},"abstract":"<jats:p>Moving garbage collectors (GCs) typically free memory by evacuating live objects in order to reclaim contiguous memory regions. Evacuation is typically done either during tracing (scavenging), or after tracing when identification of live objects is complete (mark\u2013evacuate). Scavenging typically requires more memory (memory for all objects to be moved), but performs less work in sparse memory areas (single pass). This makes it attractive for collecting young objects. Mark\u2013evacuate typically requires less memory and performs less work in memory areas with dense object clusters, by focusing relocation around sparse regions, making it attractive for collecting old objects. Mark\u2013evacuate also completes identification of live objects faster, making it attractive for concurrent GCs that can reclaim memory immediately after identification of live objects finishes (as opposed to when evacuation finishes), at the expense of more work compared to scavenging, for young objects.<\/jats:p>\n                  <jats:p>We propose an alternative approach for concurrent GCs to combine the benefits of scavenging with the benefits of mark\u2013evacuate, for young objects. The approach is based on the observation that by the time young objects are relocated by a concurrent GC, they are likely to already be unreachable. By performing relocation lazily, most of the relocations in the defragmentation phase of mark\u2013evacuate can typically be eliminated. Similar to scavenging, objects are relocated during tracing with the proposed approach. However, instead of relocating all objects that are live in the current GC cycle, it lazily relocates profitable sparse object clusters that survived from the previous GC cycle. This turns the memory headroom that concurrent GCs typically \u201cwaste\u201d in order to safely avoid running out of memory before GC finishes, into an asset used to eliminate much of the relocation work, which constitutes a significant portion of the GC work.<\/jats:p>\n                  <jats:p>We call this technique mark\u2013scavenge and implement it on-top of ZGC in OpenJDK in a collector we call MS-ZGC. We perform a performance evaluation that compares MS-ZGC against ZGC. The most striking result is (up to) 91% reduction in relocation of dead objects (depending on machine-dependent factors).<\/jats:p>","DOI":"10.1145\/3689791","type":"journal-article","created":{"date-parts":[[2024,10,8]],"date-time":"2024-10-08T03:23:04Z","timestamp":1728357784000},"page":"2268-2295","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["Mark\u2013Scavenge: Waiting for Trash to Take Itself Out"],"prefix":"10.1145","volume":"8","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-0770-1793","authenticated-orcid":false,"given":"Jonas","family":"Norlinder","sequence":"first","affiliation":[{"name":"Uppsala University, Uppsala, Sweden"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3686-8568","authenticated-orcid":false,"given":"Erik","family":"\u00d6sterlund","sequence":"additional","affiliation":[{"name":"Oracle, Stockholm, Sweden"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-5375-4058","authenticated-orcid":false,"given":"David","family":"Black-Schaffer","sequence":"additional","affiliation":[{"name":"Uppsala University, Uppsala, Sweden"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4269-5408","authenticated-orcid":false,"given":"Tobias","family":"Wrigstad","sequence":"additional","affiliation":[{"name":"Uppsala University, Uppsala, Sweden"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2024,10,8]]},"reference":[{"key":"e_1_3_2_2_2","unstructured":"2023. DaCapo 23.11-chopin. https:\/\/download.dacapobench.org\/chopin\/dacapo-23.11-chopin.zip."},{"key":"e_1_3_2_3_2","unstructured":"William Kemper Bernd Mathiske Kelvin Nilsen and Ramki Ramakrishna. 2021. JEP 404: Generational Shenandoah (Experimental). https:\/\/openjdk.org\/jeps\/404."},{"issue":"1","key":"e_1_3_2_4_2","doi-asserted-by":"crossref","first-page":"25","DOI":"10.1145\/1012888.1005693","article-title":"Myths and Realities: The Performance Impact of Garbage Collection","volume":"32","author":"Blackburn Stephen M.","year":"2004","unstructured":"Stephen M. Blackburn, Perry Cheng, and Kathryn S. McKinley. 2004. Myths and Realities: The Performance Impact of Garbage Collection. SIGMETRICS Perform. Eval. Rev. 32, 1 (jun 2004), 25\u201336. https:\/\/doi.org\/10.1145\/1012888.1005693 10.1145\/1012888.1005693","journal-title":"SIGMETRICS Perform. Eval. Rev."},{"key":"e_1_3_2_5_2","doi-asserted-by":"publisher","DOI":"10.1145\/1167473.1167488"},{"key":"e_1_3_2_6_2","first-page":"344","volume-title":"Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications (Anaheim, California, USA) (OOPSLA \u201903)","author":"Blackburn Stephen M.","year":"2003","unstructured":"Stephen M. Blackburn and Kathryn S. McKinley. 2003. Ulterior Reference Counting: Fast Garbage Collection without a Long Wait. In Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications (Anaheim, California, USA) (OOPSLA \u201903). Association for Computing Machinery, New York, NY, USA, 344\u2013358. https:\/\/doi.org\/10.1145\/949305.949336 10.1145\/949305.949336"},{"key":"e_1_3_2_7_2","doi-asserted-by":"crossref","first-page":"22","DOI":"10.1145\/1375581.1375586","volume-title":"Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation (Tucson, AZ, USA) (PLDI \u201908)","author":"Blackburn Stephen M.","year":"2008","unstructured":"Stephen M. Blackburn and Kathryn S. McKinley. 2008. Immix: a mark-region garbage collector with space efficiency, fast collection, and mutator performance. In Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation (Tucson, AZ, USA) (PLDI \u201908). Association for Computing Machinery, New York, NY, USA, 22\u201332. https:\/\/doi.org\/10.1145\/1375581.1375586 10.1145\/1375581.1375586"},{"key":"e_1_3_2_8_2","doi-asserted-by":"publisher","DOI":"10.1145\/362790.362798"},{"key":"e_1_3_2_9_2","doi-asserted-by":"publisher","DOI":"10.1145\/1029873.1029879"},{"key":"e_1_3_2_10_2","doi-asserted-by":"publisher","DOI":"10.1145\/360336.360345"},{"key":"e_1_3_2_11_2","doi-asserted-by":"publisher","DOI":"10.1145\/363269.363280"},{"key":"e_1_3_2_12_2","first-page":"9","volume-title":"Proceedings of the 13th International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools (Lugano, Switzerland) (PPPJ \u201916)","author":"Flood Christine H.","year":"2016","unstructured":"Christine H. Flood, Roman Kennke, Andrew Dinn, Andrew Haley, and Roland Westrelin. 2016. Shenandoah: An Open-Source Concurrent Compacting Garbage Collector for OpenJDK. In Proceedings of the 13th International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools (Lugano, Switzerland) (PPPJ \u201916). Association for Computing Machinery, New York, NY, USA, Article 13, 9 pages. https:\/\/doi.org\/10.1145\/2972206.2972210 10.1145\/2972206.2972210"},{"key":"e_1_3_2_13_2","doi-asserted-by":"publisher","DOI":"10.1145\/1297027.1297033"},{"key":"e_1_3_2_14_2","doi-asserted-by":"crossref","DOI":"10.1201\/9781003276142","volume-title":"The Garbage Collection Handbook: The Art of Automatic Memory Management","author":"Jones Richard","year":"2023","unstructured":"Richard Jones, Antony Hosking, and Eliot Moss. 2023. The Garbage Collection Handbook: The Art of Automatic Memory Management (second edition. ed.). CRC Press, Boca Raton, FL."},{"key":"e_1_3_2_15_2","unstructured":"Stefan Karlsson. 2021. JEP 439: Generational ZGC. https:\/\/openjdk.org\/jeps\/439."},{"key":"e_1_3_2_16_2","unstructured":"Stefan Karlsson. 2022. Z Garbage Collector. Retrieved Feb 28 2023 from https:\/\/wiki.openjdk.org\/display\/zgc\/Main"},{"issue":"1","key":"e_1_3_2_17_2","doi-asserted-by":"crossref","first-page":"264","DOI":"10.1145\/345063.339422","article-title":"Memory System Behavior of Java Programs: Methodology and Analysis","volume":"28","author":"Kim Jin-Soo","year":"2000","unstructured":"Jin-Soo Kim and Yarsun Hsu. 2000. Memory System Behavior of Java Programs: Methodology and Analysis. SIGMETRICS Perform. Eval. Rev. 28, 1 (jun 2000), 264\u2013274. https:\/\/doi.org\/10.1145\/345063.339422 10.1145\/345063.339422","journal-title":"SIGMETRICS Perform. Eval. Rev."},{"key":"e_1_3_2_18_2","doi-asserted-by":"publisher","DOI":"10.1145\/504282.504309"},{"key":"e_1_3_2_19_2","doi-asserted-by":"publisher","DOI":"10.1145\/1111596.1111597"},{"key":"e_1_3_2_20_2","doi-asserted-by":"publisher","DOI":"10.1145\/367177.367199"},{"key":"e_1_3_2_21_2","doi-asserted-by":"publisher","DOI":"10.1145\/3546918.3546928"},{"key":"e_1_3_2_22_2","unstructured":"Jonas Norlinder Erik \u00d6sterlund David Black-Schaffer and Tobias Wrigstad. 2024. [OOPSLA\u201924 Artefact] Mark\u2013Scavenge: Waiting for Trash to Take Itself Out. https:\/\/doi.org\/10.5281\/zenodo.13361333 10.5281\/zenodo.13361333"},{"key":"e_1_3_2_23_2","unstructured":"Standard Performance Evaluation Corporation. 2015. SPECjbb\u00ae 2015. https:\/\/www.spec.org\/jbb2015\/"},{"issue":"2","key":"e_1_3_2_24_2","first-page":"25","article-title":"Older-First Garbage Collection in Practice: Evaluation in a Java Virtual Machine","volume":"38","author":"Stefanovi\u0107 Darko","year":"2002","unstructured":"Darko Stefanovi\u0107, Matthew Hertz, Stephen M. Blackburn, Kathryn S. McKinley, and J. Eliot B. Moss. 2002. Older-First Garbage Collection in Practice: Evaluation in a Java Virtual Machine. SIGPLAN Not. 38, 2 supplement, 25\u201336. https:\/\/doi.org\/10.1145\/773039.773042 10.1145\/773039.773042","journal-title":"SIGPLAN Not."},{"key":"e_1_3_2_25_2","doi-asserted-by":"crossref","unstructured":"Gil Tene Balaji Iyengar and Michael Wolf. 2011. C4: The continuously concurrent compacting collector. In Proceedings of the international symposium on Memory management. 79\u201388.","DOI":"10.1145\/1993478.1993491"},{"issue":"5","key":"e_1_3_2_26_2","doi-asserted-by":"crossref","first-page":"157","DOI":"10.1145\/390011.808261","article-title":"Generation Scavenging: A non-disruptive high performance storage reclamation algorithm","volume":"19","author":"Ungar David","year":"1984","unstructured":"David Ungar. 1984. Generation Scavenging: A non-disruptive high performance storage reclamation algorithm. SIGPLAN Not. 19, 5 (apr 1984), 157\u2013167. https:\/\/doi.org\/10.1145\/390011.808261 10.1145\/390011.808261","journal-title":"SIGPLAN Not."},{"key":"e_1_3_2_27_2","doi-asserted-by":"publisher","DOI":"10.2307\/2332510"},{"key":"e_1_3_2_28_2","first-page":"1","volume-title":"Memory Management","author":"Wilson Paul R.","year":"1992","unstructured":"Paul R. Wilson. 1992. Uniprocessor garbage collection techniques. In Memory Management, Yves Bekkers and Jacques Cohen (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 1\u201342."},{"key":"e_1_3_2_29_2","doi-asserted-by":"publisher","DOI":"10.1145\/3385412.3385977"},{"key":"e_1_3_2_30_2","unstructured":"Albert Mingkun Yang and Tobias Wrigstad. 2022. Deep Dive into ZGC: A Modern Garbage Collector in OpenJDK. ACM Transactions on Programming Languages and Systems (TOPLAS) (2022)."},{"key":"e_1_3_2_31_2","doi-asserted-by":"publisher","DOI":"10.1016\/0164-1212(90)90084-Y"},{"key":"e_1_3_2_32_2","doi-asserted-by":"publisher","DOI":"10.1145\/3519939.3523440"},{"key":"e_1_3_2_33_2","doi-asserted-by":"publisher","DOI":"10.1145\/91556.91597"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3689791","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3689791","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,2,4]],"date-time":"2026-02-04T09:11:22Z","timestamp":1770196282000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3689791"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,10,8]]},"references-count":32,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2024,10,8]]}},"alternative-id":["10.1145\/3689791"],"URL":"https:\/\/doi.org\/10.1145\/3689791","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,10,8]]},"assertion":[{"value":"2024-04-05","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-08-18","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-10-08","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}