summaryrefslogtreecommitdiff
path: root/reclaim.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-10-25 11:45:38 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-10-25 11:45:38 +0300
commitff55290a3bcab7f9763d74214c03a7b65646f990 (patch)
tree79f681b0e484d1ec872fbe43a843c26044daac79 /reclaim.c
parent9d231fb884f33df6c285bd6c43671c13d2b26826 (diff)
downloadbdwgc-ff55290a3bcab7f9763d74214c03a7b65646f990.tar.gz
Do not use system clock consistently if NO_CLOCK
Issue #139 (bdwgc). * alloc.c (GC_try_to_collect_inner, world_stopped_total_time, world_stopped_total_divisor, MAX_TOTAL_TIME_DIVISOR, GC_stopped_mark): Replace "ifndef SMALL_CONFIG" with "ifndef NO_CLOCK". * reclaim.c (GC_reclaim_all): Likewise. * alloc.c (GC_finish_collection): Replace "ifndef SMALL_CONFIG" with "ifndef NO_CLOCK" except for GC_print_finalization_stats invocation. * doc/README.macros (NO_CLOCK): Document. * include/private/gc_priv.h (CLOCK_TYPE, GET_TIME, MS_TIME_DIFF): Do not define if NO_CLOCK. * include/private/gc_priv.h (GC_print_stats): Define as a macro (to 0) only if both NO_CLOCK and SMALL_CONFIG are defined. * misc.c (GC_print_stats): Do not define if both NO_CLOCK and SMALL_CONFIG are defined. * misc.c (GC_init): Do not set GC_print_stats only if both NO_CLOCK and SMALL_CONFIG are defined. * tests/test.c (run_one_test): Do not define start_time, reverse_time, time_diff local variables (and do not use GET_TIME, MS_TIME_DIFF) if NO_CLOCK is defined.
Diffstat (limited to 'reclaim.c')
-rw-r--r--reclaim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/reclaim.c b/reclaim.c
index 5bd69979..ec20a17a 100644
--- a/reclaim.c
+++ b/reclaim.c
@@ -711,7 +711,7 @@ GC_INNER GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old)
struct obj_kind * ok;
struct hblk ** rlp;
struct hblk ** rlh;
-# ifndef SMALL_CONFIG
+# ifndef NO_CLOCK
CLOCK_TYPE start_time = 0; /* initialized to prevent warning. */
if (GC_print_stats == VERBOSE)
@@ -739,7 +739,7 @@ GC_INNER GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old)
}
}
}
-# ifndef SMALL_CONFIG
+# ifndef NO_CLOCK
if (GC_print_stats == VERBOSE) {
CLOCK_TYPE done_time;