Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /impnotes/memory-models.html [68d76d] .. [d48316] Maximize Restore

  Switch to side-by-side view

--- a/impnotes/memory-models.html
+++ b/impnotes/memory-models.html
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>34.4. Memory Models</title><link rel="stylesheet" href="impnotes.css" type="text/css" /><link rev="made" href="mailto:clisp-list@sf.net" /><meta name="generator" content="DocBook XSL Stylesheets V1.68.1" /><link rel="start" href="index.html" title="Implementation Notes for GNU CLISP" /><link rel="up" href="gc.html" title="Chapter 34. Overview of CLISP's Garbage Collection" /><link rel="prev" href="typecodes.html" title="34.3. Object Pointer Representations" /><link rel="next" href="gc-safety.html" title="34.5. The burden of garbage-collection upon the rest of CLISP" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">34.4. Memory Models</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="typecodes.html">Prev</a> </td><th width="60%" align="center">Chapter 34. Overview of <span><strong class="command">CLISP</strong></span>'s Garbage Collection</th><td width="20%" align="right"> <a accesskey="n" href="gc-safety.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="memory-models"></a>34.4. Memory Models</h2></div></div></div><p>There are 6 memory models. Which one is used, depends on the
-operating system and is determined at build time.</p><div class="variablelist"><p class="title"><b>Memory Models</b></p><dl><dt>SPVW_MIXED_BLOCKS_OPPOSITE</dt><dd><p>The heap consists of one block of fixed length
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>34.4. Memory Models</title><link rel="stylesheet" href="impnotes.css" type="text/css" /><link rev="made" href="mailto:clisp-list@lists.sourceforge.net" /><meta name="generator" content="DocBook XSL Stylesheets V2005-10-07_10:16_snapshot" /><link rel="start" href="index.html" title="Implementation Notes for GNU CLISP" /><link rel="up" href="gc.html" title="Chapter 34. Overview of CLISP's Garbage Collection" /><link rel="prev" href="typecodes.html" title="34.3. Object Pointer Representations" /><link rel="next" href="gc-safety.html" title="34.5. The burden of garbage-collection upon the rest of CLISP" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">34.4. Memory Models</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="typecodes.html">Prev</a> </td><th width="60%" align="center">Chapter 34. Overview of <span><strong class="command">CLISP</strong></span>'s Garbage Collection</th><td width="20%" align="right"> <a accesskey="n" href="gc-safety.html">Next</a></td></tr></table><hr /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="memory-models"></a>34.4. Memory Models</h2></div></div></div><p>There are 6 memory models. Which one is used, depends on the
+operating system and is determined at build time.</p><div class="variablelist"><p class="title"><b>Memory Models</b></p><dl><dt><span class="term">SPVW_MIXED_BLOCKS_OPPOSITE</span></dt><dd><p>The heap consists of one block of fixed length
   (allocated at startup).
   The variable-length objects are allocated from the left, the 2-pointer
   objects are allocated from the right.
@@ -12,27 +12,27 @@
   When no more room is available, some reserve area beyond the right end
   of the block is halved, and the 2-pointer objects are moved to the
   right accordingly.
-  </p><div class="variablelist"><p class="title"><b>overview</b></p><dl><dt>(+)</dt><dd>Simple management.
-    </dd><dt>(+)</dt><dd>No fragmentation at all.
-    </dd><dt>(-)</dt><dd>The total heap size is limited.
-    </dd></dl></div><p>
- </p></dd><dt>SPVW_MIXED_BLOCKS_OPPOSITE &amp; TRIVIALMAP_MEMORY</dt><dd><p>The heap consists of two big blocks, one for
+  </p><div class="variablelist"><p class="title"><b>Advantages and Disadvantages</b></p><table border="0"><col align="left" valign="top" /><tbody><tr><td><span class="term">(+)</span></td><td>Simple management.
+    </td></tr><tr><td><span class="term">(+)</span></td><td>No fragmentation at all.
+    </td></tr><tr><td><span class="term">(-)</span></td><td>The total heap size is limited.
+    </td></tr></tbody></table></div><p>
+ </p></dd><dt><span class="term">SPVW_MIXED_BLOCKS_OPPOSITE &amp; TRIVIALMAP_MEMORY</span></dt><dd><p>The heap consists of two big blocks, one for
   variable-length objects and one for 2-pointer objects.
   The former one has a hole to the right and is extensible to the right,
   the latter one has a hole to the left and is extensible to the left.
   Similar to the previous model, except that the hole is unmapped.
-  </p><div class="variablelist"><p class="title"><b>overview</b></p><dl><dt>(+)</dt><dd>Total heap size grows depending on the
-     application's needs.</dd><dt>(+)</dt><dd>No fragmentation at all.
-    </dd><dt>(*)</dt><dd>Works only when SINGLEMAP_MEMORY is
-     possible as well.</dd></dl></div><p>
- </p></dd><dt>SPVW_MIXED_BLOCKS_STAGGERED &amp; TRIVIALMAP_MEMORY</dt><dd><p>The heap consists of two big blocks, one for
+  </p><div class="variablelist"><p class="title"><b>Advantages and Disadvantages</b></p><table border="0"><col align="left" valign="top" /><tbody><tr><td><span class="term">(+)</span></td><td>Total heap size grows depending on the
+     application's needs.</td></tr><tr><td><span class="term">(+)</span></td><td>No fragmentation at all.
+    </td></tr><tr><td><span class="term">(*)</span></td><td>Works only when SINGLEMAP_MEMORY is
+     possible as well.</td></tr></tbody></table></div><p>
+ </p></dd><dt><span class="term">SPVW_MIXED_BLOCKS_STAGGERED &amp; TRIVIALMAP_MEMORY</span></dt><dd><p>The heap consists of two big blocks, one for
   variable-length objects and one for 2-pointer objects.
   Both have a hole to the right, but are extensible to the right.
-  </p><div class="variablelist"><p class="title"><b>overview</b></p><dl><dt>(+)</dt><dd>Total heap size grows depending on the
-     application's needs.</dd><dt>(+)</dt><dd>No fragmentation at all.
-    </dd><dt>(*)</dt><dd>Works only when SINGLEMAP_MEMORY is
-     possible as well.</dd></dl></div><p>
- </p></dd><dt>SPVW_MIXED_PAGES</dt><dd><p>The heap consists of many small pages (usually around 8 KB).
+  </p><div class="variablelist"><p class="title"><b>Advantages and Disadvantages</b></p><table border="0"><col align="left" valign="top" /><tbody><tr><td><span class="term">(+)</span></td><td>Total heap size grows depending on the
+     application's needs.</td></tr><tr><td><span class="term">(+)</span></td><td>No fragmentation at all.
+    </td></tr><tr><td><span class="term">(*)</span></td><td>Works only when SINGLEMAP_MEMORY is
+     possible as well.</td></tr></tbody></table></div><p>
+ </p></dd><dt><span class="term">SPVW_MIXED_PAGES</span></dt><dd><p>The heap consists of many small pages (usually around 8 KB).
   There are two kinds of pages: one for 2-pointer objects, one for
   variable-length objects.
   The set of all pages of a fixed kind is called a "Heap".
@@ -46,18 +46,18 @@
   If the holes then make up more than 25% of the occupied storage, a
   second GC turn moves objects across pages, from nearly empty ones to
   nearly full ones, with the aim to free as many pages as possible.
-  </p><div class="variablelist"><p class="title"><b>overview</b></p><dl><dt>(-)</dt><dd>every allocation requires AVL tree operations,
-     thus slower</dd><dt>(+)</dt><dd>Total heap size grows depending on the
-     application's needs.</dd><dt>(+)</dt><dd>Works on operating systems which do not provide
-     large contiguous areas.</dd></dl></div><p>
- </p></dd><dt>SPVW_PURE_PAGES</dt><dd><p>Just like SPVW_MIXED_PAGES, except that every page
+  </p><div class="variablelist"><p class="title"><b>Advantages and Disadvantages</b></p><table border="0"><col align="left" valign="top" /><tbody><tr><td><span class="term">(-)</span></td><td>Every allocation requires AVL tree operations,
+     thus slower</td></tr><tr><td><span class="term">(+)</span></td><td>Total heap size grows depending on the
+     application's needs.</td></tr><tr><td><span class="term">(+)</span></td><td>Works on operating systems which do not provide
+     large contiguous areas.</td></tr></tbody></table></div><p>
+ </p></dd><dt><span class="term">SPVW_PURE_PAGES</span></dt><dd><p>Just like SPVW_MIXED_PAGES, except that every page
   contains data of only a single type tag, i.e. there is a Heap for
   every type tag.
-  </p><div class="variablelist"><p class="title"><b>overview</b></p><dl><dt>(-)</dt><dd>every allocation requires AVL tree operations,
-     thus slower</dd><dt>(+)</dt><dd>Total heap size grows depending on the
-     application's needs.</dd><dt>(+)</dt><dd>Works on operating systems which do not provide
-     large contiguous areas.</dd><dt>(-)</dt><dd>More fragmentation because objects of different
-    type never fit into the same page.</dd></dl></div></dd><dt>SPVW_PURE_BLOCKS</dt><dd><p>There is a big block of storage for each type tag.
+  </p><div class="variablelist"><p class="title"><b>Advantages and Disadvantages</b></p><table border="0"><col align="left" valign="top" /><tbody><tr><td><span class="term">(-)</span></td><td>Every allocation requires AVL tree operations,
+     thus slower</td></tr><tr><td><span class="term">(+)</span></td><td>Total heap size grows depending on the
+     application's needs.</td></tr><tr><td><span class="term">(+)</span></td><td>Works on operating systems which do not provide
+     large contiguous areas.</td></tr><tr><td><span class="term">(-)</span></td><td>More fragmentation because objects of different
+    type never fit into the same page.</td></tr></tbody></table></div></dd><dt><span class="term">SPVW_PURE_BLOCKS</span></dt><dd><p>There is a big block of storage for each type tag.
   Each of these blocks has its data to the left and the hole to the
   right, but these blocks are extensible to the right (because there is
   enough room between them).
@@ -65,13 +65,15 @@
   last GC reaches 50% of the amount of used space at the last GC, but at
   least 512 KB.
   The <a href="gc.html" title="Chapter 34. Overview of CLISP's Garbage Collection">garbage-collect</a>ion cleans up each block separately: data is moved left.
-  </p><div class="variablelist"><p class="title"><b>overview</b></p><dl><dt>(+)</dt><dd>Total heap size grows depending on the
-     application's needs.</dd><dt>(+)</dt><dd>No 16 MB total size limit.
-    </dd><dt>(*)</dt><dd>Works only in combination with SINGLEMAP_MEMORY.
-    </dd></dl></div><p>
+  </p><div class="variablelist"><p class="title"><b>Advantages and Disadvantages</b></p><table border="0"><col align="left" valign="top" /><tbody><tr><td><span class="term">(+)</span></td><td>Total heap size grows depending on the
+     application's needs.</td></tr><tr><td><span class="term">(+)</span></td><td>No 16 MB total size limit.
+    </td></tr><tr><td><span class="term">(*)</span></td><td>Works only in combination with SINGLEMAP_MEMORY.
+    </td></tr></tbody></table></div><p>
  </p></dd></dl></div><p>In page based memory models, an object larger than a page is the
 only object carried by its pages.
 There are no small objects in pages belonging to a big object.</p><p>The following combinations of memory model and
  <a class="unix" href="http://www.opengroup.org/onlinepubs/007904975/functions/mmap.html"><code class="function">mmap</code></a> tricks are possible (the number
  indicates the order in which the respective models have been
- developed):</p><div class="table"><a id="mem-models-comb-typecodes"></a><p class="title"><b>Table 34.1. Memory models with <a href="typecodes.html" title="34.3. Object Pointer Representations"><span class="strong"><strong><code class="option">TYPECODES</code></strong></span></a></b></p><table summary="Memory models with TYPECODES" border="1"><colgroup><col /><col /><col /><col /><col /><col /></colgroup><thead><tr><th align="center"> </th><th align="center">no MAP_MEMORY</th><th align="center">TRIVIALMAP_MEMORY</th><th align="center">SINGLEMAP_MEMORY</th><th align="center">MULTIMAP_MEMORY</th><th align="center">GENERATIONAL_GC</th></tr></thead><tbody><tr><td align="center">SPVW_MIXED_BLOCKS_OPPOSITE</td><td align="center">1</td><td align="center">10</td><td align="center"> </td><td align="center">2</td><td align="center">9</td></tr><tr><td align="center">SPVW_MIXED_BLOCKS_STAGGERED</td><td align="center"> </td><td align="center">7</td><td align="center"> </td><td align="center"> </td><td align="center">8</td></tr><tr><td align="center">SPVW_PURE_BLOCKS</td><td align="center"> </td><td align="center"> </td><td align="center">5</td><td align="center"> </td><td align="center">6</td></tr><tr><td align="center">SPVW_MIXED_PAGES</td><td align="center">3</td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td></tr><tr><td align="center">SPVW_PURE_PAGES</td><td align="center">4</td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td></tr></tbody></table></div><div class="table"><a id="mem-models-comb-heapcodes"></a><p class="title"><b>Table 34.2. Memory models with <a href="typecodes.html" title="34.3. Object Pointer Representations"><span class="strong"><strong><code class="option">HEAPCODES</code></strong></span></a></b></p><table summary="Memory models with HEAPCODES" border="1"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th align="center"> </th><th align="center">no MAP_MEMORY</th><th align="center">TRIVIALMAP_MEMORY</th><th align="center">GENERATIONAL_GC</th></tr></thead><tbody><tr><td align="center">SPVW_MIXED_BLOCKS_OPPOSITE</td><td align="center">*</td><td align="center">*</td><td align="center">*</td></tr><tr><td align="center">SPVW_MIXED_BLOCKS_STAGGERED</td><td align="center"> </td><td align="center">*</td><td align="center">*</td></tr><tr><td align="center">SPVW_MIXED_PAGES</td><td align="center">*</td><td align="center"> </td><td align="center"> </td></tr></tbody></table></div></div><div class="bookinfo"><hr width="100%" /><table width="100%" summary="impnotes meta info"><th><td align="left">These notes document <a href="http://clisp.cons.org" target="_top"><span><strong class="command">CLISP</strong></span></a> version 2.35</td><td align="right">Last modified: 2005-08-29</td></th></table></div><div class="custom-footer"><hr width="100%" /><table width="100%"><tr><td align="left"><a href="http://clisp.cons.org"><img src="clisp.png" width="48" height="48" alt="[CLISP home]" /></a></td><td align="center"><a href="http://www.gnu.org"><img src="http://www.gnu.org/graphics/gnubanner.jpg" width="468" height="60" alt="[Come and see what GNU creates for YOU]" /></a></td><td align="right"><a href="http://sourceforge.net"><img width="125" height="37" alt="[SourceForge]" src="http://sflogo.sourceforge.net/sflogo.php?group_id=1355&amp;type=2&amp;page=memory-models" /></a></td></tr></table></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="typecodes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gc.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gc-safety.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">34.3. Object Pointer Representations </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 34.5. The burden of garbage-collection upon the rest of <span><strong class="command">CLISP</strong></span></td></tr></table></div></body></html>
+ developed):</p><div class="table"><a id="mem-models-comb-typecodes"></a><p class="title"><b>Table 34.1. Memory models with <a href="typecodes.html" title="34.3. Object Pointer Representations"><span class="strong"><strong><code class="option">TYPECODES</code></strong></span></a></b></p><table summary="Memory models with TYPECODES" border="1"><colgroup><col /><col /><col /><col /><col /><col /></colgroup><thead><tr><th align="center"> </th><th align="center"><a href="memory-models.html#MMC-A">A</a></th><th align="center"><a href="memory-models.html#MMC-B">B</a></th><th align="center"><a href="memory-models.html#MMC-C">C</a></th><th align="center"><a href="memory-models.html#MMC-D">D</a></th><th align="center"><a href="memory-models.html#MMC-E">E</a></th></tr></thead><tbody><tr><td align="center">SPVW_MIXED_BLOCKS_OPPOSITE</td><td align="center">1</td><td align="center">10</td><td align="center"> </td><td align="center">2</td><td align="center">9</td></tr><tr><td align="center">SPVW_MIXED_BLOCKS_STAGGERED</td><td align="center"> </td><td align="center">7</td><td align="center"> </td><td align="center"> </td><td align="center">8</td></tr><tr><td align="center">SPVW_PURE_BLOCKS</td><td align="center"> </td><td align="center"> </td><td align="center">5</td><td align="center"> </td><td align="center">6</td></tr><tr><td align="center">SPVW_MIXED_PAGES</td><td align="center">3</td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td></tr><tr><td align="center">SPVW_PURE_PAGES</td><td align="center">4</td><td align="center"> </td><td align="center"> </td><td align="center"> </td><td align="center"> </td></tr></tbody></table></div><div class="table"><a id="mem-models-comb-heapcodes"></a><p class="title"><b>Table 34.2. Memory models with <a href="typecodes.html" title="34.3. Object Pointer Representations"><span class="strong"><strong><code class="option">HEAPCODES</code></strong></span></a></b></p><table summary="Memory models with HEAPCODES" border="1"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th align="center"> </th><th align="center"><a href="memory-models.html#MMC-A">A</a></th><th align="center"><a href="memory-models.html#MMC-B">B</a></th><th align="center"><a href="memory-models.html#MMC-E">E</a></th></tr></thead><tbody><tr><td align="center">SPVW_MIXED_BLOCKS_OPPOSITE</td><td align="center">*</td><td align="center">*</td><td align="center">*</td></tr><tr><td align="center">SPVW_MIXED_BLOCKS_STAGGERED</td><td align="center"> </td><td align="center">*</td><td align="center">*</td></tr><tr><td align="center">SPVW_MIXED_PAGES</td><td align="center">*</td><td align="center"> </td><td align="center"> </td></tr></tbody></table></div><div class="orderedlist"><p class="title"><b>Legend to
+  <a href="memory-models.html#mem-models-comb-typecodes" title="Table 34.1. Memory models with TYPECODES">Table 34.1, “Memory models with <span class="strong"><strong><code class="option">TYPECODES</code></strong></span>”</a> and
+  <a href="memory-models.html#mem-models-comb-heapcodes" title="Table 34.2. Memory models with HEAPCODES">Table 34.2, “Memory models with <span class="strong"><strong><code class="option">HEAPCODES</code></strong></span>”</a></b></p><ol type="A"><li><a id="MMC-A"></a>no MAP_MEMORY</li><li><a id="MMC-B"></a>TRIVIALMAP_MEMORY</li><li><a id="MMC-C"></a>SINGLEMAP_MEMORY</li><li><a id="MMC-D"></a>MULTIMAP_MEMORY</li><li><a id="MMC-E"></a>GENERATIONAL_GC</li></ol></div></div><div class="bookinfo"><hr width="100%" /><table width="100%" summary="impnotes meta info"><th><td align="left">These notes document <a href="http://clisp.cons.org" target="_top"><span><strong class="command">CLISP</strong></span></a> version 2.36</td><td align="right">Last modified: 2005-12-04</td></th></table></div><div class="custom-footer"><hr width="100%" /><table width="100%"><tr><td align="left"><a href="http://clisp.cons.org"><img src="clisp.png" width="48" height="48" alt="[CLISP home]" /></a></td><td align="center"><a href="http://sourceforge.net/donate/index.php?group_id=1355"><img src="http://images.sourceforge.net/images/project-support.jpg" width="88" height="32" border="0" alt="[Support This Project]" /></a></td><td align="right"><a href="http://sourceforge.net"><img width="125" height="37" alt="[SourceForge]" src="http://sflogo.sourceforge.net/sflogo.php?group_id=1355&amp;type=2&amp;page=memory-models" /></a></td></tr></table></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="typecodes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gc.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="gc-safety.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">34.3. Object Pointer Representations </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 34.5. The burden of garbage-collection upon the rest of <span><strong class="command">CLISP</strong></span></td></tr></table></div></body></html>