| 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.
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 |
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>