provided the above notices are retained, and a notice that the code was
modified is included with the above copyright notice.
-This is version 5.0 of a conservative garbage collector for C and C++.
+This is version 5.1 of a conservative garbage collector for C and C++.
You might find a more recent version of this at
This caused occasional failures under Windows 98, and may also be
an issue under Windows NT/2000.
+Since 5.0
+ - Fixed a gc.h header bug which showed up under Irix. (Thanks to
+ Dan Sullivan.)
+ - Fixed a typo in GC_double_descr in typd_mlc.c not getting traced correctly.
+ This probably could result in objects described by array descriptors not
+ getting traced correctly. (Thanks to Ben Hutchings for pointing this out.)
+ - The block nearly full tests in reclaim.c were not correct for 64 bit
+ environments. This could result in unnecessary heap growth under unlikely
+ conditions.
+ - Removed use of CLEAR_DOUBLE from generic reclaim code, since odd sizes
+ could occur.
+
To do:
- Integrate Linux/SPARC fixes.
- Very large root set sizes (> 16 MB or so) could cause the collector
/* Clear object, advance p to next object in the process */
q = p + sz;
p++; /* Skip link field */
-# if defined(SMALL_CONFIG) && defined(ALIGN_DOUBLE)
- /* We assert that sz must be even */
- *p++ = 0;
- while (p < q) {
- CLEAR_DOUBLE(p);
- p += 2;
- }
-# else
- while (p < q) {
+ while (p < q) {
*p++ = 0;
- }
-# endif
+ }
}
word_no += sz;
}
switch(sz) {
# ifndef SMALL_CONFIG
case 1:
- full = GC_block_nearly_full1(hhdr, 0xffffffffl);
+# if CPP_WORDSZ == 64
+ full = GC_block_nearly_full1(hhdr, 0xffffffffffffffffl);
+# else
+ full = GC_block_nearly_full1(hhdr, 0xffffffffl);
+# endif
if (TRUE == full) goto out;
if (FALSE == full) GC_write_hint(hbp);
/* In the DONT_KNOW case, we let reclaim fault. */
*flh = GC_reclaim1(hbp, hhdr, *flh);
break;
case 2:
- full = GC_block_nearly_full1(hhdr, 0x55555555l);
+# if CPP_WORDSZ == 64
+ full = GC_block_nearly_full1(hhdr, 0x5555555555555555l);
+# else
+ full = GC_block_nearly_full1(hhdr, 0x55555555l);
+# endif
if (TRUE == full) goto out;
if (FALSE == full) GC_write_hint(hbp);
*flh = GC_reclaim_clear2(hbp, hhdr, *flh);
break;
case 4:
- full = GC_block_nearly_full1(hhdr, 0x11111111l);
+# if CPP_WORDSZ == 64
+ full = GC_block_nearly_full1(hhdr, 0x1111111111111111l);
+# else
+ full = GC_block_nearly_full1(hhdr, 0x11111111l);
+# endif
if (TRUE == full) goto out;
if (FALSE == full) GC_write_hint(hbp);
*flh = GC_reclaim_clear4(hbp, hhdr, *flh);
switch(sz) {
# ifndef SMALL_CONFIG
case 1:
- full = GC_block_nearly_full1(hhdr, 0xffffffffl);
+# if CPP_WORDSZ == 64
+ full = GC_block_nearly_full1(hhdr, 0xffffffffffffffffl);
+# else
+ full = GC_block_nearly_full1(hhdr, 0xffffffffl);
+# endif
if (TRUE == full) goto out;
if (FALSE == full) GC_write_hint(hbp);
*flh = GC_reclaim1(hbp, hhdr, *flh);
break;
case 2:
- full = GC_block_nearly_full1(hhdr, 0x55555555l);
+# if CPP_WORDSZ == 64
+ full = GC_block_nearly_full1(hhdr, 0x5555555555555555l);
+# else
+ full = GC_block_nearly_full1(hhdr, 0x55555555l);
+# endif
if (TRUE == full) goto out;
if (FALSE == full) GC_write_hint(hbp);
*flh = GC_reclaim_uninit2(hbp, hhdr, *flh);
break;
case 4:
- full = GC_block_nearly_full1(hhdr, 0x11111111l);
+# if CPP_WORDSZ == 64
+ full = GC_block_nearly_full1(hhdr, 0x1111111111111111l);
+# else
+ full = GC_block_nearly_full1(hhdr, 0x11111111l);
+# endif
if (TRUE == full) goto out;
if (FALSE == full) GC_write_hint(hbp);
*flh = GC_reclaim_uninit4(hbp, hhdr, *flh);