1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Only sanity check numbers if SCM_DEBUG_CELL_ACCESSES is unset.

SCM_DEBUG_CELL_ACCESSES uses the mark bits for its own purposes.
This commit is contained in:
Han-Wen Nienhuys 2008-08-26 22:49:05 -03:00
parent 80237dcc77
commit 487b9dec2e

View file

@ -599,6 +599,7 @@ scm_i_gc (const char *what)
/* Sanity check our numbers. */ /* Sanity check our numbers. */
#if (SCM_DEBUG_CELL_ACCESSES == 0)
/* If this was not true, someone touched mark bits outside of the /* If this was not true, someone touched mark bits outside of the
mark phase. */ mark phase. */
assert (scm_cells_allocated == scm_i_marked_count ()); assert (scm_cells_allocated == scm_i_marked_count ());
@ -607,7 +608,8 @@ scm_i_gc (const char *what)
+ scm_i_master_freelist2.heap_total_cells)); + scm_i_master_freelist2.heap_total_cells));
assert (scm_i_gc_sweep_stats.collected + scm_cells_allocated assert (scm_i_gc_sweep_stats.collected + scm_cells_allocated
== scm_i_gc_sweep_stats.swept); == scm_i_gc_sweep_stats.swept);
#endif /* SCM_DEBUG_CELL_ACCESSES */
/* Mark */ /* Mark */
scm_c_hook_run (&scm_before_mark_c_hook, 0); scm_c_hook_run (&scm_before_mark_c_hook, 0);