From 7e59301c1d5e557a0756762646de39f97766cf3d Mon Sep 17 00:00:00 2001 From: hboehm Date: Fri, 5 Jun 2009 03:59:36 +0000 Subject: [PATCH] 2009-06-04 Hans Boehm (Really Ivan Maidanski) (diff89_cvs, resembling diff3, diff27, diff34, diff38, diff47, diff49, diff59, diff60, diff66, diff67, diff68, diff69a, diff70, diff81 partly) * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove outdated comment about disabling signals. * mallocx.c (GC_malloc_uncollectable, GC_malloc_atomic_uncollectable): Ditto. * os_dep.c: Ditto. * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change): Add ARGSUSED tag. * pthread_stop_world.c (GC_suspend_handler, GC_suspend_handler_inner): Ditto. * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message. * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default switch branch to suppress compiler warning. * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort(). * include/private/darwin_semaphore.h (sem_init): Ditto. * include/javaxfc.h: Replace "GC_H" with "_GC_H". * include/private/dbg_mlc.h (GC_has_other_debug_info, GC_store_debug_info): Replace K&R-style function prototypes with ANSI C one. * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc, GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Ditto. * include/private/pthread_support.h (GC_stop_init): Ditto. * include/private/gcconfig.h: Refine comment about setting GC_stackbottom. * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the "right" places. * include/private/pthread_support.h (GC_Thread_Rep): Refine comment for "stack_end" field. * mallocx.c (GC_malloc_uncollectable, GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk". * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting GC_mem_top_down to MEM_TOP_DOWN for debug purposes). * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN() format specifier (should be word-compliant, "%p" is used w/o "0x"). * pthread_stop_world.c (GC_suspend_handler_inner): Ditto. * os_dep.c (GC_dirty_init): Append new-line to printf messages. * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message. * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT. * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define as STATIC. * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that "thread_blocked" is not set for the current thread. * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning. * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to suppress compiler warning. --- ChangeLog | 49 ++++++++++++++++++++++++++++++ dbg_mlc.c | 13 +++----- dyn_load.c | 2 +- include/javaxfc.h | 2 +- include/private/darwin_semaphore.h | 2 +- include/private/dbg_mlc.h | 4 +-- include/private/gcconfig.h | 16 +++++----- include/private/pthread_support.h | 5 +-- mallocx.c | 6 ++-- os_dep.c | 22 ++++++++------ pthread_stop_world.c | 15 +++++---- real_malloc.c | 7 +++++ reclaim.c | 2 +- 13 files changed, 102 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index d3eebe87..31e79806 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,52 @@ +2009-06-04 Hans Boehm (Really Ivan Maidanski) + (diff89_cvs, resembling diff3, diff27, diff34, diff38, diff47, diff49, + diff59, diff60, diff66, diff67, diff68, diff69a, diff70, diff81 + partly) + * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove + outdated comment about disabling signals. + * mallocx.c (GC_malloc_uncollectable, + GC_malloc_atomic_uncollectable): Ditto. + * os_dep.c: Ditto. + * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change): + Add ARGSUSED tag. + * pthread_stop_world.c (GC_suspend_handler, + GC_suspend_handler_inner): Ditto. + * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message. + * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default + switch branch to suppress compiler warning. + * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort(). + * include/private/darwin_semaphore.h (sem_init): Ditto. + * include/javaxfc.h: Replace "GC_H" with "_GC_H". + * include/private/dbg_mlc.h (GC_has_other_debug_info, + GC_store_debug_info): Replace K&R-style function prototypes with ANSI + C one. + * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc, + GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Ditto. + * include/private/pthread_support.h (GC_stop_init): Ditto. + * include/private/gcconfig.h: Refine comment about setting + GC_stackbottom. + * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the + "right" places. + * include/private/pthread_support.h (GC_Thread_Rep): Refine comment + for "stack_end" field. + * mallocx.c (GC_malloc_uncollectable, + GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk". + * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting + GC_mem_top_down to MEM_TOP_DOWN for debug purposes). + * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN() + format specifier (should be word-compliant, "%p" is used w/o "0x"). + * pthread_stop_world.c (GC_suspend_handler_inner): Ditto. + * os_dep.c (GC_dirty_init): Append new-line to printf messages. + * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message. + * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT. + * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define + as STATIC. + * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that + "thread_blocked" is not set for the current thread. + * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning. + * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to + suppress compiler warning. + 2009-06-02 Hans Boehm (Really Ivan Maidanski) (adding last bit of diff86_cvs) * tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef. diff --git a/dbg_mlc.c b/dbg_mlc.c index 70137d4c..dfc13b9a 100644 --- a/dbg_mlc.c +++ b/dbg_mlc.c @@ -246,9 +246,6 @@ ptr_t GC_store_debug_info(ptr_t p, word sz, const char *string, word integer) register word * result = (word *)((oh *)p + 1); DCL_LOCK_STATE; - /* There is some argument that we should dissble signals here. */ - /* But that's expensive. And this way things should only appear */ - /* inconsistent while we're in the handler. */ LOCK(); GC_ASSERT(GC_size(p) >= sizeof(oh) + sz); GC_ASSERT(!(SMALL_OBJ(sz) && CROSSES_HBLK(p, sz))); @@ -278,9 +275,6 @@ STATIC ptr_t GC_store_debug_info_inner(ptr_t p, word sz, char *string, { register word * result = (word *)((oh *)p + 1); - /* There is some argument that we should disable signals here. */ - /* But that's expensive. And this way things should only appear */ - /* inconsistent while we're in the handler. */ GC_ASSERT(GC_size(p) >= sizeof(oh) + sz); GC_ASSERT(!(SMALL_OBJ(sz) && CROSSES_HBLK(p, sz))); # ifdef KEEP_BACK_PTRS @@ -615,10 +609,12 @@ GC_API void * GC_CALL GC_debug_malloc_stubborn(size_t lb, GC_EXTRA_PARAMS) return GC_debug_malloc(lb, OPT_RA s, i); } +/*ARGSUSED*/ GC_API void GC_CALL GC_debug_change_stubborn(void *p) { } +/*ARGSUSED*/ GC_API void GC_CALL GC_debug_end_stubborn_change(void *p) { } @@ -711,7 +707,7 @@ GC_API void GC_CALL GC_debug_free(void * p) } if ((ptr_t)p - (ptr_t)base != sizeof(oh)) { GC_err_printf( - "GC_debug_free called on pointer %p wo debugging info\n", p); + "GC_debug_free called on pointer %p w/o debugging info\n", p); } else { # ifndef SHORT_DBG_HDRS clobbered = GC_check_annotated_obj((oh *)base); @@ -790,7 +786,7 @@ GC_API void * GC_CALL GC_debug_realloc(void * p, size_t lb, GC_EXTRA_PARAMS) } if ((ptr_t)p - (ptr_t)base != sizeof(oh)) { GC_err_printf( - "GC_debug_realloc called on pointer %p wo debugging info\n", p); + "GC_debug_realloc called on pointer %p w/o debugging info\n", p); return(GC_realloc(p, lb)); } hhdr = HDR(base); @@ -815,6 +811,7 @@ GC_API void * GC_CALL GC_debug_realloc(void * p, size_t lb, GC_EXTRA_PARAMS) break; # endif default: + result = NULL; /* initialized to prevent warning. */ GC_err_printf("GC_debug_realloc: encountered bad kind\n"); ABORT("bad kind"); } diff --git a/dyn_load.c b/dyn_load.c index d443ff1e..f84311d6 100644 --- a/dyn_load.c +++ b/dyn_load.c @@ -1239,7 +1239,7 @@ void GC_init_dyld() { # endif if(!_dyld_bind_fully_image_containing_address((unsigned long*)GC_malloc)) - GC_abort("_dyld_bind_fully_image_containing_address failed"); + ABORT("_dyld_bind_fully_image_containing_address failed"); } } diff --git a/include/javaxfc.h b/include/javaxfc.h index ac8d81ab..46643e93 100644 --- a/include/javaxfc.h +++ b/include/javaxfc.h @@ -1,4 +1,4 @@ -# ifndef GC_H +# ifndef _GC_H # include "gc.h" # endif diff --git a/include/private/darwin_semaphore.h b/include/private/darwin_semaphore.h index 0f43982d..9baceebe 100644 --- a/include/private/darwin_semaphore.h +++ b/include/private/darwin_semaphore.h @@ -21,7 +21,7 @@ typedef struct { static int sem_init(sem_t *sem, int pshared, int value) { int ret; if(pshared) - GC_abort("sem_init with pshared set"); + ABORT("sem_init with pshared set"); sem->value = value; ret = pthread_mutex_init(&sem->mutex,NULL); diff --git a/include/private/dbg_mlc.h b/include/private/dbg_mlc.h index 27808bda..34443270 100644 --- a/include/private/dbg_mlc.h +++ b/include/private/dbg_mlc.h @@ -161,7 +161,7 @@ typedef struct { #ifdef SHORT_DBG_HDRS # define GC_has_other_debug_info(p) TRUE #else - GC_bool GC_has_other_debug_info(/* p */); + GC_bool GC_has_other_debug_info(ptr_t p); #endif #if defined(KEEP_BACK_PTRS) || defined(MAKE_BACK_GRAPH) @@ -173,6 +173,6 @@ typedef struct { /* Store debugging info into p. Return displaced pointer. */ /* Assumes we don't hold allocation lock. */ -ptr_t GC_store_debug_info(/* p, sz, string, integer */); +ptr_t GC_store_debug_info(ptr_t p, word sz, const char *str, word integer); #endif /* _DBG_MLC_H */ diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index be3d5ec3..0aea9a61 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -594,7 +594,7 @@ * easily accomplished by introducing a new main program, setting * GC_stackbottom to the address of a local variable, and then calling * the original main program. The new main program would read something - * like: + * like (provided real_main() is not inlined by the compiler): * * # include "gc_private.h" * @@ -803,7 +803,7 @@ # define DYNAMIC_LOADING # endif extern char etext[]; - extern char * GC_FreeBSDGetDataStart(); + ptr_t GC_FreeBSDGetDataStart(size_t max_page_size, ptr_t etext_addr); # define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext) # endif # ifdef NETBSD @@ -1907,7 +1907,7 @@ # define DYNAMIC_LOADING # endif extern char etext[]; - extern char * GC_FreeBSDGetDataStart(); + ptr_t GC_FreeBSDGetDataStart(size_t max_page_size, ptr_t etext_addr); # define DATASTART GC_FreeBSDGetDataStart(0x1000, &etext) # endif # ifdef NETBSD @@ -2267,7 +2267,7 @@ # endif # if !defined(FIXUP_POINTER) && defined(POINTER_MASK) -# define FIXUP_POINTER(p) (p) = ((p) & (POINTER_MASK) << POINTER_SHIFT) +# define FIXUP_POINTER(p) (p = ((p) & POINTER_MASK) << POINTER_SHIFT) # endif # if defined(FIXUP_POINTER) @@ -2315,7 +2315,7 @@ /* does. */ struct hblk; /* See gc_priv.h. */ # if defined(PCR) - char * real_malloc(); + char * real_malloc(size_t bytes); # define GET_MEM(bytes) HBLKPTR(real_malloc((size_t)bytes + GC_page_size) \ + GC_page_size-1) # elif defined(OS2) @@ -2329,7 +2329,7 @@ # define GET_MEM(bytes) HBLKPTR((size_t) calloc(1, (size_t)bytes + GC_page_size) \ + GC_page_size-1) # elif defined(MSWIN32) - extern ptr_t GC_win32_get_mem(); + ptr_t GC_win32_get_mem(GC_word bytes); # define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes) # elif defined(MACOS) # if defined(USE_TEMPORARY_MEMORY) @@ -2342,7 +2342,7 @@ NewPtrClear(bytes + GC_page_size) + GC_page_size-1) # endif # elif defined(MSWINCE) - extern ptr_t GC_wince_get_mem(); + ptr_t GC_wince_get_mem(GC_word bytes); # define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes) # elif defined(AMIGA) && defined(GC_AMIGA_FASTALLOC) extern void *GC_amiga_get_mem(size_t size); @@ -2350,7 +2350,7 @@ GC_amiga_get_mem((size_t)bytes + GC_page_size) \ + GC_page_size-1) # else - extern ptr_t GC_unix_get_mem(); + ptr_t GC_unix_get_mem(GC_word bytes); # define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes) # endif diff --git a/include/private/pthread_support.h b/include/private/pthread_support.h index 77f1ad1a..43248bfd 100644 --- a/include/private/pthread_support.h +++ b/include/private/pthread_support.h @@ -49,7 +49,8 @@ typedef struct GC_Thread_Rep { /* has set its sp value. Thus it does */ /* not need to be sent a signal to stop */ /* it. */ - ptr_t stack_end; /* Cold end of the stack. */ + ptr_t stack_end; /* Cold end of the stack (except for */ + /* main thread). */ # ifdef IA64 ptr_t backing_store_end; ptr_t backing_store_ptr; @@ -73,7 +74,7 @@ extern GC_bool GC_thr_initialized; GC_thread GC_lookup_thread(pthread_t id); -void GC_stop_init(); +void GC_stop_init(void); extern GC_bool GC_in_thread_creation; /* We may currently be in thread creation or destruction. */ diff --git a/mallocx.c b/mallocx.c index 6aa572b8..54ae1c4a 100644 --- a/mallocx.c +++ b/mallocx.c @@ -453,7 +453,6 @@ GC_API void * GC_CALL GC_malloc_uncollectable(size_t lb) opp = &(GC_uobjfreelist[lg]); LOCK(); if( (op = *opp) != 0 ) { - /* See above comment on signals. */ *opp = obj_link(op); obj_link(op) = 0; GC_bytes_allocd += GRANULES_TO_BYTES(lg); @@ -476,7 +475,7 @@ GC_API void * GC_CALL GC_malloc_uncollectable(size_t lb) if (0 == op) return(0); GC_ASSERT(((word)op & (HBLKSIZE - 1)) == 0); /* large block */ - hhdr = HDR((struct hbklk *)op); + hhdr = HDR(op); /* We don't need the lock here, since we have an undisguised */ /* pointer. We do need to hold the lock while we adjust */ /* mark bits. */ @@ -541,7 +540,6 @@ GC_API void * GC_CALL GC_malloc_atomic_uncollectable(size_t lb) opp = &(GC_auobjfreelist[lg]); LOCK(); if( (op = *opp) != 0 ) { - /* See above comment on signals. */ *opp = obj_link(op); obj_link(op) = 0; GC_bytes_allocd += GRANULES_TO_BYTES(lg); @@ -561,7 +559,7 @@ GC_API void * GC_CALL GC_malloc_atomic_uncollectable(size_t lb) if (0 == op) return(0); GC_ASSERT(((word)op & (HBLKSIZE - 1)) == 0); - hhdr = HDR((struct hbklk *)op); + hhdr = HDR(op); LOCK(); set_mark_bit_from_hdr(hhdr, 0); /* Only object. */ diff --git a/os_dep.c b/os_dep.c index 97c272e3..e3b98b36 100644 --- a/os_dep.c +++ b/os_dep.c @@ -1838,9 +1838,14 @@ SYSTEM_INFO GC_sysinfo; word GC_n_heap_bases = 0; -DWORD GC_mem_top_down = 0; /* Change to MEM_TOP_DOWN for better 64-bit */ +#ifdef GC_USE_MEM_TOP_DOWN + STATIC DWORD GC_mem_top_down = MEM_TOP_DOWN; + /* Use GC_USE_MEM_TOP_DOWN for better 64-bit */ /* testing. Otherwise all addresses tend to */ /* end up in first 4GB, hiding bugs. */ +#else + STATIC DWORD GC_mem_top_down = 0; +#endif ptr_t GC_win32_get_mem(word bytes) { @@ -2309,7 +2314,7 @@ STATIC void GC_or_pages(page_hash_table pht1, page_hash_table pht2) if ( i != 0 && last_warned != start && warn_count++ < 5) { last_warned = start; WARN( - "GC_gww_read_dirty unexpectedly failed at %ld: " + "GC_gww_read_dirty unexpectedly failed at %p: " "Falling back to marking all pages dirty\n", start); } for (j = 0; j < nblocks; ++j) { @@ -2364,8 +2369,7 @@ STATIC void GC_or_pages(page_hash_table pht1, page_hash_table pht2) # ifdef DEFAULT_VDB -/* All of the following assume the allocation lock is held, and */ -/* signals are disabled. */ +/* All of the following assume the allocation lock is held. */ /* The client asserts that unallocated pages in the heap are never */ /* written. */ @@ -2859,7 +2863,7 @@ void GC_dirty_init(void) GC_old_segv_handler_used_si = FALSE; } if (GC_old_segv_handler == (SIG_HNDLR_PTR)SIG_IGN) { - GC_err_printf("Previously ignored segmentation violation!?"); + GC_err_printf("Previously ignored segmentation violation!?\n"); GC_old_segv_handler = (SIG_HNDLR_PTR)SIG_DFL; } if (GC_old_segv_handler != (SIG_HNDLR_PTR)SIG_DFL) { @@ -2877,7 +2881,7 @@ void GC_dirty_init(void) GC_old_bus_handler_used_si = FALSE; } if (GC_old_bus_handler == (SIG_HNDLR_PTR)SIG_IGN) { - GC_err_printf("Previously ignored bus error!?"); + GC_err_printf("Previously ignored bus error!?\n"); GC_old_bus_handler = (SIG_HNDLR_PTR)SIG_DFL; } if (GC_old_bus_handler != (SIG_HNDLR_PTR)SIG_DFL) { @@ -3578,7 +3582,7 @@ static void *GC_mprotect_thread(void *arg) /* This will fail if the thread dies, but the thread */ /* shouldn't die... */ # ifdef BROKEN_EXCEPTION_HANDLING - GC_err_printf("mach_msg failed with %d %s while sending" + GC_err_printf("mach_msg failed with %d %s while sending " "exc reply\n", (int)r,mach_error_string(r)); # else ABORT("mach_msg failed while sending exception reply"); @@ -3845,7 +3849,7 @@ catch_exception_raise(mach_port_t exception_port, mach_port_t thread, } if(++last_fault_count < 32) { if(last_fault_count == 1) - WARN("Ignoring KERN_PROTECTION_FAILURE at %lx\n", (GC_word)addr); + WARN("Ignoring KERN_PROTECTION_FAILURE at %p\n", addr); return KERN_SUCCESS; } @@ -4017,7 +4021,7 @@ void GC_save_callers (struct callinfo info[NFRAMES]) } GC_in_save_callers = TRUE; # endif - GC_ASSERT(sizeof(struct callinfo) == sizeof(void *)); + GC_STATIC_ASSERT(sizeof(struct callinfo) == sizeof(void *)); npcs = backtrace((void **)tmp_info, NFRAMES + IGNORE_FRAMES); BCOPY(tmp_info+IGNORE_FRAMES, info, (npcs - IGNORE_FRAMES) * sizeof(void *)); for (i = npcs - IGNORE_FRAMES; i < NFRAMES; ++i) info[i].ci_pc = 0; diff --git a/pthread_stop_world.c b/pthread_stop_world.c index 737bbfd2..ae1d225a 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -75,9 +75,9 @@ volatile AO_t GC_world_is_stopped = FALSE; /* stopped). */ #ifdef GC_OSF1_THREADS - GC_bool GC_retry_signals = TRUE; + STATIC GC_bool GC_retry_signals = TRUE; #else - GC_bool GC_retry_signals = FALSE; + STATIC GC_bool GC_retry_signals = FALSE; #endif /* @@ -104,19 +104,20 @@ volatile AO_t GC_world_is_stopped = FALSE; # endif #endif -sem_t GC_suspend_ack_sem; +STATIC sem_t GC_suspend_ack_sem; #ifdef GC_NETBSD_THREADS # define GC_NETBSD_THREADS_WORKAROUND /* It seems to be necessary to wait until threads have restarted. */ /* But it is unclear why that is the case. */ - sem_t GC_restart_ack_sem; + STATIC sem_t GC_restart_ack_sem; #endif STATIC void GC_suspend_handler_inner(ptr_t sig_arg, void *context); #if defined(IA64) || defined(HP_PA) || defined(M68K) #ifdef SA_SIGINFO +/*ARGSUSED*/ STATIC void GC_suspend_handler(int sig, siginfo_t *info, void *context) #else STATIC void GC_suspend_handler(int sig) @@ -144,6 +145,7 @@ STATIC void GC_suspend_handler(int sig) } #endif +/*ARGSUSED*/ STATIC void GC_suspend_handler_inner(ptr_t sig_arg, void *context) { int sig = (int)(word)sig_arg; @@ -167,8 +169,8 @@ STATIC void GC_suspend_handler_inner(ptr_t sig_arg, void *context) if (me -> stop_info.last_stop_count == my_stop_count) { /* Duplicate signal. OK if we are retrying. */ if (!GC_retry_signals) { - WARN("Duplicate suspend signal in thread %lx\n", - pthread_self()); + WARN("Duplicate suspend signal in thread %p\n", + (word)pthread_self()); } return; } @@ -264,6 +266,7 @@ void GC_push_all_stacks(void) if (p -> flags & FINISHED) continue; ++nthreads; if (THREAD_EQUAL(p -> id, me)) { + GC_ASSERT(!p->thread_blocked); # ifdef SPARC lo = (ptr_t)GC_save_regs_in_stack(); # else diff --git a/real_malloc.c b/real_malloc.c index 85befdcb..01be5f0f 100644 --- a/real_malloc.c +++ b/real_malloc.c @@ -27,5 +27,12 @@ void * real_malloc(size_t size) { return(malloc(size)); } + +# else + +extern int GC_quiet; + /* ANSI C doesn't allow translation units to be empty. */ + /* So we guarantee this one is nonempty. */ + #endif /* PCR */ diff --git a/reclaim.c b/reclaim.c index 220caf83..12afa918 100644 --- a/reclaim.c +++ b/reclaim.c @@ -570,7 +570,7 @@ GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old) struct hblk ** rlp; struct hblk ** rlh; # ifndef SMALL_CONFIG - CLOCK_TYPE start_time; + CLOCK_TYPE start_time = 0; /* initialized to prevent warning. */ CLOCK_TYPE done_time; if (GC_print_stats == VERBOSE) -- 2.40.0