4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>GarbageCollection</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
19 <body class="article">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
26 <h1>GarbageCollection</h1>
30 <div class="sectionbody">
31 <div class="paragraph"><p>For a good introduction and overview to garbage collection, see
32 <a href="References#Jones99">Jones99</a>.</p></div>
33 <div class="paragraph"><p>MLton’s garbage collector uses copying, mark-compact, and generational
34 collection, automatically switching between them at run time based on
35 the amount of live data relative to the amount of RAM. The runtime
36 system tries to keep the heap within RAM if at all possible.</p></div>
37 <div class="paragraph"><p>MLton’s copying collector is a simple, two-space, breadth-first,
38 Cheney-style collector. The design for the generational and
39 mark-compact GC is based on <a href="References#Sansom91">Sansom91</a>.</p></div>
43 <h2 id="_design_notes">Design notes</h2>
44 <div class="sectionbody">
45 <div class="ulist"><ul>
48 <a href="http://www.mlton.org/pipermail/mlton/2002-May/012420.html">http://www.mlton.org/pipermail/mlton/2002-May/012420.html</a>
50 <div class="paragraph"><p>object layout and header word design</p></div>
56 <h2 id="_also_see">Also see</h2>
57 <div class="sectionbody">
58 <div class="ulist"><ul>
61 <a href="Regions">Regions</a>
68 <div id="footnotes"><hr></div>
70 <div id="footer-text">
72 <div id="footer-badges">