<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="AsciiDoc 8.6.10">
<title>GarbageCollection</title>
<link rel="stylesheet" href="./asciidoc.css" type="text/css">
<link rel="stylesheet" href="./pygments.css" type="text/css">


<script type="text/javascript" src="./asciidoc.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
asciidoc.install();
/*]]>*/
</script>
<link rel="stylesheet" href="./mlton.css" type="text/css">
</head>
<body class="article">
<div id="banner">
<div id="banner-home">
<a href="./Home">MLton 20201002</a>
</div>
</div>
<div id="header">
<h1>GarbageCollection</h1>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>For a good introduction and overview to garbage collection, see
<a href="References#Jones99">Jones99</a>.</p></div>
<div class="paragraph"><p>MLton&#8217;s garbage collector uses copying, mark-compact, and generational
collection, automatically switching between them at run time based on
the amount of live data relative to the amount of RAM.  The runtime
system tries to keep the heap within RAM if at all possible.</p></div>
<div class="paragraph"><p>MLton&#8217;s copying collector is a simple, two-space, breadth-first,
Cheney-style collector.  The design for the generational and
mark-compact GC is based on <a href="References#Sansom91">Sansom91</a>.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_design_notes">Design notes</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
<a href="http://www.mlton.org/pipermail/mlton/2002-May/012420.html">http://www.mlton.org/pipermail/mlton/2002-May/012420.html</a>
</p>
<div class="paragraph"><p>object layout and header word design</p></div>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_also_see">Also see</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
<a href="Regions">Regions</a>
</p>
</li>
</ul></div>
</div>
</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
</div>
<div id="footer-badges">
</div>
</div>
</body>
</html>
