Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram
authorIvan Maidanski <ivmai@mail.ru>
Mon, 9 Dec 2013 04:44:05 +0000 (08:44 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 9 Dec 2013 04:44:05 +0000 (08:44 +0400)
* doc/tree.html (picture): Remove DISCARD_WORDS (since always zero
and already removed from the code in gc-6.0alpha6).

doc/tree.html

index d52e2fa..429ae19 100644 (file)
@@ -163,7 +163,7 @@ GET_HDR(p)| word   hb_sz (words) |              |
           |   hb_last_reclaimed  |
  ---      +----------------------+
   ^       |                      |
- MARK_BITS|       hb_marks[]     | *if hdr is free, hb_sz + DISCARD_WORDS
+ MARK_BITS|       hb_marks[]     | *if hdr is free, hb_sz
 _SZ(words)|                      |  is the size of a heap chunk (struct hblk)
   v       |                      |  of at least MININCR*HBLKSIZE bytes (below),
  ---      +----------------------+  otherwise, size of each object in chunk.
@@ -172,20 +172,20 @@ Dynamic data structures above are interleaved throughout the heap in blocks of
 size MININCR * HBLKSIZE bytes as done by gc_scratch_alloc which cannot be
 freed; free lists are used (e.g. alloc_hdr).  HBLK's below are collected.
 
-              (struct hblk)
- ---      +----------------------+ < HBLKSIZE ---         ---          DISCARD_
-  ^       |garbage[DISCARD_WORDS]|   aligned   ^           ^ HDR_BYTES WORDS
-  |       |                      |             |           v (bytes)   (words)
-  |       +-----hb_body----------+ < WORDSZ    |          ---   ---
-  |       |                      |   aligned   |           ^     ^
-  |       |      Object 0        |             |           hb_sz |
-  |       |                      |           i |(word-    (words)|
-  |       |                      |      (bytes)|aligned)   v     |
-  |       + - - - - - - - - - - -+ ---         |          ---    |
-  |       |                      |  ^          |           ^     |
-  n *     |                      |  j (words)  |          hb_sz BODY_SZ
- HBLKSIZE |      Object 1        |  v          v           |   (words)
- (bytes)  |                      |---------------          v   MAX_OFFSET
+              (struct hblk)                                  HDR_BYTES
+ ---      +----------------------+ < HBLKSIZE  ---            (bytes)
+  ^       +-----hb_body----------+ (and WORDSZ) ^         ---   ---
+  |       |                      |   aligned    |          ^     ^
+  |       |                      |              |        hb_sz   |
+  |       |                      |              |       (words)  |
+  |       |      Object 0        |              |          |     |
+  |       |                      |            i |(word-    v     |
+  |       + - - - - - - - - - - -+ ---   (bytes)|aligned) ---    |
+  |       |                      |  ^           |          ^     |
+  |       |                      |  j (words)   |          |     |
+  n *     |      Object 1        |  v           v        hb_sz BODY_SZ
+ HBLKSIZE |                      |---------------          |   (words)
+ (bytes)  |                      |                         v   MAX_OFFSET
   |       + - - - - - - - - - - -+                        ---  (bytes)
   |       |                      | !All_INTERIOR_PTRS      ^     |
   |       |                      | sets j only for       hb_sz   |
@@ -193,7 +193,5 @@ freed; free lists are used (e.g. alloc_hdr).  HBLK's below are collected.
   v       |                      | All objects WORDSZ      v     v
  ---      +----------------------+ aligned.               ---   ---
 
-DISCARD_WORDS is normally zero.  Indeed the collector has not been tested
-with another value in ages.
-</pre>
+</PRE>
 </body>