summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-04-07 22:35:46 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:57 +0200
commitbe457cfd5dde0cc1a1db497a70c15b7bd38153b8 (patch)
tree3a5446226dc138c7113e857a219cd971fc24cea0 /misc.c
parent1348d9d446428a3afc8900881b61ed7bbdffe5f5 (diff)
2011-04-07 Ivan Maidanski <ivmai@mail.ru>
* alloc.c (GC_check_heap, GC_print_all_smashed): Move the definition from misc.c. * dbg_mlc.c (GC_debug_malloc_atomic_uncollectable): Define as public. * include/gc.h (GC_debug_malloc_atomic_uncollectable): Declare. * include/gc.h (GC_MALLOC_ATOMIC_UNCOLLECTABLE): Define new public macro. * dbg_mlc.c (MAX_SMASHED): Don't define if already set. * reclaim.c (MAX_LEAKED): Ditto. * dbg_mlc.c (GC_add_smashed): Add FIXME about the concurrent access to the global array. * reclaim.c (GC_add_leaked): Ditto. * misc.c (GC_print_back_height): Set on if GC_PRINT_BACK_HEIGHT (new macro) is defined. * doc/README.macros (GC_PRINT_BACK_HEIGHT): Document. * misc.c (GC_dump_regularly, GC_init): Replace 0/1 for GC_dump_regularly and GC_print_back_height variables with FALSE/TRUE. * reclaim.c (GC_print_all_errors): Refine the comment.
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/misc.c b/misc.c
index a27d9aa..51a9248 100644
--- a/misc.c
+++ b/misc.c
@@ -76,9 +76,6 @@ GC_FAR struct _GC_arrays GC_arrays /* = { 0 } */;
GC_INNER GC_bool GC_debugging_started = FALSE;
/* defined here so we don't have to load debug_malloc.o */
-GC_INNER void (*GC_check_heap)(void) = 0;
-GC_INNER void (*GC_print_all_smashed)(void) = 0;
-
ptr_t GC_stackbottom = 0;
#ifdef IA64
@@ -95,10 +92,14 @@ GC_bool GC_quiet = 0; /* used also in pcr_interface.c */
GC_bool GC_print_stats = 0;
#endif
-GC_INNER GC_bool GC_print_back_height = 0;
+#ifdef GC_PRINT_BACK_HEIGHT
+ GC_INNER GC_bool GC_print_back_height = TRUE;
+#else
+ GC_INNER GC_bool GC_print_back_height = FALSE;
+#endif
#ifndef NO_DEBUGGING
- GC_INNER GC_bool GC_dump_regularly = 0;
+ GC_INNER GC_bool GC_dump_regularly = FALSE;
/* Generate regular debugging dumps. */
#endif
@@ -739,7 +740,7 @@ GC_API void GC_CALL GC_init(void)
# endif /* !SMALL_CONFIG */
# ifndef NO_DEBUGGING
if (0 != GETENV("GC_DUMP_REGULARLY")) {
- GC_dump_regularly = 1;
+ GC_dump_regularly = TRUE;
}
# endif
# ifdef KEEP_BACK_PTRS
@@ -761,7 +762,7 @@ GC_API void GC_CALL GC_init(void)
GC_dont_gc = 1;
}
if (0 != GETENV("GC_PRINT_BACK_HEIGHT")) {
- GC_print_back_height = 1;
+ GC_print_back_height = TRUE;
}
if (0 != GETENV("GC_NO_BLACKLIST_WARNING")) {
GC_large_alloc_warn_interval = LONG_MAX;