=================================================================== RCS file: /home/cvs/OpenXM_contrib/gc/Attic/misc.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- OpenXM_contrib/gc/Attic/misc.c 1999/11/27 10:58:32 1.1.1.1 +++ OpenXM_contrib/gc/Attic/misc.c 2000/04/14 11:07:57 1.1.1.2 @@ -44,12 +44,13 @@ # else # if defined(IRIX_THREADS) || defined(LINUX_THREADS) \ || defined(IRIX_JDK_THREADS) -# ifdef UNDEFINED - pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER; -# endif pthread_t GC_lock_holder = NO_THREAD; # else - --> declare allocator lock here +# if defined(HPUX_THREADS) + pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER; +# else + --> declare allocator lock here +# endif # endif # endif # endif @@ -73,6 +74,12 @@ GC_bool GC_dont_gc = 0; GC_bool GC_quiet = 0; +#ifdef FIND_LEAK + int GC_find_leak = 1; +#else + int GC_find_leak = 0; +#endif + /*ARGSUSED*/ GC_PTR GC_default_oom_fn GC_PROTO((size_t bytes_requested)) { @@ -385,6 +392,11 @@ size_t GC_get_heap_size GC_PROTO(()) return ((size_t) GC_heapsize); } +size_t GC_get_free_bytes GC_PROTO(()) +{ + return ((size_t) GC_large_free_bytes); +} + size_t GC_get_bytes_since_gc GC_PROTO(()) { return ((size_t) WORDS_TO_BYTES(GC_words_allocd)); @@ -427,23 +439,22 @@ void GC_init_inner() # ifdef MSWIN32 GC_init_win32(); # endif -# if defined(LINUX) && defined(POWERPC) - GC_init_linuxppc(); +# if defined(LINUX) && \ + (defined(POWERPC) || defined(ALPHA) || defined(SPARC) || defined(IA64)) + GC_init_linux_data_start(); # endif -# if defined(LINUX) && defined(SPARC) - GC_init_linuxsparc(); -# endif # ifdef SOLARIS_THREADS GC_thr_init(); /* We need dirty bits in order to find live stack sections. */ GC_dirty_init(); # endif # if defined(IRIX_THREADS) || defined(LINUX_THREADS) \ - || defined(IRIX_JDK_THREADS) + || defined(IRIX_JDK_THREADS) || defined(HPUX_THREADS) GC_thr_init(); # endif # if !defined(THREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) \ - || defined(IRIX_THREADS) || defined(LINUX_THREADS) + || defined(IRIX_THREADS) || defined(LINUX_THREADS) \ + || defined(HPUX_THREADS) if (GC_stackbottom == 0) { GC_stackbottom = GC_get_stack_base(); } @@ -558,7 +569,8 @@ void GC_init_inner() void GC_enable_incremental GC_PROTO(()) { -# if !defined(FIND_LEAK) && !defined(SMALL_CONFIG) +# if !defined(SMALL_CONFIG) + if (!GC_find_leak) { DCL_LOCK_STATE; DISABLE_SIGNALS(); @@ -596,6 +608,7 @@ void GC_enable_incremental GC_PROTO(()) out: UNLOCK(); ENABLE_SIGNALS(); + } # endif }