=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/gc/misc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -p -r1.1.1.1 -r1.2 --- OpenXM_contrib2/asir2000/gc/misc.c 1999/12/03 07:39:10 1.1.1.1 +++ OpenXM_contrib2/asir2000/gc/misc.c 2000/04/10 08:31:31 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,7 +439,8 @@ void GC_init_inner() # ifdef MSWIN32 GC_init_win32(); # endif -# if defined(LINUX) && (defined(POWERPC) || defined(ALPHA) || defined(SPARC)) +# if defined(LINUX) && \ + (defined(POWERPC) || defined(ALPHA) || defined(SPARC) || defined(IA64)) GC_init_linux_data_start(); # endif # ifdef SOLARIS_THREADS @@ -436,11 +449,12 @@ void GC_init_inner() 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(); } @@ -555,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(); @@ -593,6 +608,7 @@ void GC_enable_incremental GC_PROTO(()) out: UNLOCK(); ENABLE_SIGNALS(); + } # endif }