]> granicus.if.org Git - gc/commit
Add assertions to check GC_large_free_bytes and GC_root_size values by
authorIvan Maidanski <ivmai@mail.ru>
Tue, 31 Jan 2012 16:10:14 +0000 (20:10 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 31 Jan 2012 16:10:14 +0000 (20:10 +0400)
commitf50c6cc54d81600ac2dacfac0bdbd5bcc3aedb05
treeb9560b5e8b38437a5f24f134d3917cd3895f23ca
parentad1d9870850adfb7cc33ec72182ab8f5dc747005
Add assertions to check GC_large_free_bytes and GC_root_size values by
GC_finish_collection even if GC_dump_regularly is off

* allchblk.c (GC_compute_large_free_bytes): New inner function
(defined only if GC_ASSERTIONS or not NO_DEBUGGING).
* mark_rts.c (GC_compute_root_size): Likewise.
* allchblk.c (GC_print_hblkfreelist): Call GC_compute_large_free_bytes
instead of computing large_free_bytes itself (only if not USE_MUNMAP
for now); remove "sz" local variable.
* allchblk.c (GC_print_hblkfreelist): Refine logged messages (for
total value).
* mark_rts.c (GC_print_static_roots): Likewise.
* include/private/gc_priv.h (GC_dump_regularly, COND_DUMP): Move
definition down below GC_ASSERT one.
* include/private/gc_priv.h (GC_compute_large_free_bytes,
GC_compute_root_size): New function declaration (only if
GC_ASSERTIONS).
* include/private/gc_priv.h (COND_DUMP_CHECKS): New macro (invoke
GC_ASSERT for GC_large_free_bytes and GC_root_size).
* include/private/gc_priv.h (COND_DUMP): Invoke COND_DUMP_CHECKS
unless GC_dump_regularly.
* mark_rts.c (GC_print_static_roots): Call GC_compute_root_size
instead of computing root size itself; rename "total" local variable
to "size".
allchblk.c
include/private/gc_priv.h
mark_rts.c