<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="robots" content="index,nofollow">



<title>GarbageCollection - MLton Standard ML Compiler (SML Compiler)</title>
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="all" href="common.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="screen" href="screen.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="print" href="print.css">


<link rel="Start" href="Home">


</head>

<body lang="en" dir="ltr">

<table bgcolor = lightblue cellspacing = 0 style = "border: 0px;" width = 100%>
  <tr>
    <td style = "
		border: 0px;
		color: darkblue; 
		font-size: 150%;
		text-align: left;">
      <a class = mltona href="Home">MLton 20051202</a>
    <td style = "
		border: 0px;
		font-size: 150%;
		text-align: center;
		width: 50%;">
      GarbageCollection
    <td style = "
		border: 0px;
		text-align: right;">
      <table cellspacing = 0 style = "border: 0px">
        <tr style = "vertical-align: middle;">
      </table>
  <tr style = "background-color: white;">
    <td colspan = 3
	style = "
		border: 0px;
		font-size:70%;
		text-align: right;">
      <a href = "Home">Home</a>
      &nbsp;<a href = "Index">Index</a>
      &nbsp;
</table>
<div id="content" lang="en" dir="ltr">
For a good introduction and overview to garbage collection, see <a href = "References#Jones99">Jones99</a>. <p>
MLton'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>
<p>
MLton'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>
<h2 id="head-ca5ffa1ff2511b4bf15f18d7a672a126f9977950">Design notes</h2>

    <ul>

    <li>
<p>
 <a class="external" href="http://mlton.org/pipermail/mlton/2002-May/012420.html"><img src="moin-www.png" alt="[WWW]" height="11" width="11">http://mlton.org/pipermail/mlton/2002-May/012420.html</a>  <br>
 object layout and header word design 
</p>
</li>

    </ul>


<h2 id="head-a4bc8bf5caf54b18cea9f58e83dd4acb488deb17">Also see</h2>

    <ul>

    <li>
<p>
 <a href="Regions">Regions</a> 
</p>
</li>
</ul>

</div>



<p>
<hr>
Last edited on 2005-09-06 23:28:47 by <span title="cfs34.cs.cornell.edu"><a href="MatthewFluet">MatthewFluet</a></span>.
</body></html>
