From 880fbe03621de5c8d2ac093eb67d4dc14a21ac10 Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Fri, 11 Aug 2006 14:19:18 +0000
Subject: [PATCH] Add a note about vectors that the data portion of the header
 word is zero for normal vectors and non-zero for the key/value vector in a
 hash table.

---
 docs/internals/object.tex | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/docs/internals/object.tex b/docs/internals/object.tex
index 0c7f8ae57..82b4988c4 100644
--- a/docs/internals/object.tex
+++ b/docs/internals/object.tex
@@ -193,7 +193,7 @@ data field of the header for ratio and complex numbers is two, one word each
 for the numerator and denominator or for the real and imaginary parts.
 
 For vectors and data-blocks representing Lisp objects stored like vectors, the
-system ignores the data portion of the header-word:
+system (usually) ignores the data portion of the header-word:
 \begin{verbatim}
 ----------------------------------------------------------------
 | Unused Data (24 bits)   | Type (8 bits with low-tag) | 0 1 0 |
@@ -208,6 +208,12 @@ the header for complex arrays and vectors has a second word, following the
 header-word, the system uses for the fill pointer, so computing the length of
 any array is the same code sequence.
 
+For normal Lisp vectors, the data portion MUST be zero.  For hash
+tables, a vector is used to store information about the hash key and
+value, and the data portion is non-zero to indicate to GC that this is
+the key/value vector for the hash table.  GENCGC uses this to
+determine scavenge the key/value pairs correctly.  Cheney GC also uses
+this to determine if rehashing (for EQ hash tables) is needed.
 
 
 \section{Data-Blocks and Other-immediates Typing}
-- 
GitLab