[BACK]Return to misc.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gc

Diff for /OpenXM_contrib/gc/Attic/misc.c between version 1.1 and 1.1.1.3

version 1.1, 1999/11/27 10:58:32 version 1.1.1.3, 2000/12/01 14:48:23
Line 42 
Line 42 
 #          ifdef WIN32_THREADS  #          ifdef WIN32_THREADS
               GC_API CRITICAL_SECTION GC_allocate_ml;                GC_API CRITICAL_SECTION GC_allocate_ml;
 #          else  #          else
 #             if defined(IRIX_THREADS) || defined(LINUX_THREADS) \  #             if defined(IRIX_THREADS) || defined(IRIX_JDK_THREADS) \
                  || defined(IRIX_JDK_THREADS)                   || (defined(LINUX_THREADS) && defined(USE_SPIN_LOCK))
 #               ifdef UNDEFINED  
                     pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER;  
 #               endif  
                 pthread_t GC_lock_holder = NO_THREAD;                  pthread_t GC_lock_holder = NO_THREAD;
 #             else  #             else
                 --> declare allocator lock here  #               if defined(HPUX_THREADS) \
                      || defined(LINUX_THREADS) && !defined(USE_SPIN_LOCK)
                     pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER;
   #               else
                     --> declare allocator lock here
   #               endif
 #             endif  #             endif
 #          endif  #          endif
 #       endif  #       endif
Line 73  GC_bool GC_dont_gc = 0;
Line 75  GC_bool GC_dont_gc = 0;
   
 GC_bool GC_quiet = 0;  GC_bool GC_quiet = 0;
   
   #ifdef FIND_LEAK
     int GC_find_leak = 1;
   #else
     int GC_find_leak = 0;
   #endif
   
 /*ARGSUSED*/  /*ARGSUSED*/
 GC_PTR GC_default_oom_fn GC_PROTO((size_t bytes_requested))  GC_PTR GC_default_oom_fn GC_PROTO((size_t bytes_requested))
 {  {
Line 112  extern signed_word GC_mem_found;
Line 120  extern signed_word GC_mem_found;
         for (i = 8*sizeof(word) + 1; i <= 16 * sizeof(word); i++) {          for (i = 8*sizeof(word) + 1; i <= 16 * sizeof(word); i++) {
               GC_size_map[i] = (ROUNDED_UP_WORDS(i) + 1) & (~1);                GC_size_map[i] = (ROUNDED_UP_WORDS(i) + 1) & (~1);
         }          }
   #       ifdef GC_GCJ_SUPPORT
              /* Make all sizes up to 32 words predictable, so that a      */
              /* compiler can statically perform the same computation,     */
              /* or at least a computation that results in similar size    */
              /* classes.                                                  */
              for (i = 16*sizeof(word) + 1; i <= 32 * sizeof(word); i++) {
                 GC_size_map[i] = (ROUNDED_UP_WORDS(i) + 3) & (~3);
              }
   #       endif
         /* We leave the rest of the array to be filled in on demand. */          /* We leave the rest of the array to be filled in on demand. */
     }      }
   
Line 385  size_t GC_get_heap_size GC_PROTO(())
Line 402  size_t GC_get_heap_size GC_PROTO(())
     return ((size_t) GC_heapsize);      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(())  size_t GC_get_bytes_since_gc GC_PROTO(())
 {  {
     return ((size_t) WORDS_TO_BYTES(GC_words_allocd));      return ((size_t) WORDS_TO_BYTES(GC_words_allocd));
Line 427  void GC_init_inner()
Line 449  void GC_init_inner()
 #   ifdef MSWIN32  #   ifdef MSWIN32
         GC_init_win32();          GC_init_win32();
 #   endif  #   endif
 #   if defined(LINUX) && defined(POWERPC)  #   if defined(SEARCH_FOR_DATA_START)
         GC_init_linuxppc();          /* This doesn't really work if the collector is in a shared library. */
           GC_init_linux_data_start();
 #   endif  #   endif
 #   if defined(LINUX) && defined(SPARC)  
         GC_init_linuxsparc();  
 #   endif  
 #   ifdef SOLARIS_THREADS  #   ifdef SOLARIS_THREADS
         GC_thr_init();          GC_thr_init();
         /* We need dirty bits in order to find live stack sections.     */          /* We need dirty bits in order to find live stack sections.     */
         GC_dirty_init();          GC_dirty_init();
 #   endif  #   endif
 #   if defined(IRIX_THREADS) || defined(LINUX_THREADS) \  #   if defined(IRIX_THREADS) || defined(LINUX_THREADS) \
        || defined(IRIX_JDK_THREADS)         || defined(IRIX_JDK_THREADS) || defined(HPUX_THREADS)
         GC_thr_init();          GC_thr_init();
 #   endif  #   endif
 #   if !defined(THREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) \  #   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) {        if (GC_stackbottom == 0) {
         GC_stackbottom = GC_get_stack_base();          GC_stackbottom = GC_get_stack_base();
       }        }
Line 558  void GC_init_inner()
Line 579  void GC_init_inner()
   
 void GC_enable_incremental GC_PROTO(())  void GC_enable_incremental GC_PROTO(())
 {  {
 # if  !defined(FIND_LEAK) && !defined(SMALL_CONFIG)  # if !defined(SMALL_CONFIG)
     if (!GC_find_leak) {
     DCL_LOCK_STATE;      DCL_LOCK_STATE;
   
     DISABLE_SIGNALS();      DISABLE_SIGNALS();
Line 596  void GC_enable_incremental GC_PROTO(())
Line 618  void GC_enable_incremental GC_PROTO(())
 out:  out:
     UNLOCK();      UNLOCK();
     ENABLE_SIGNALS();      ENABLE_SIGNALS();
     }
 # endif  # endif
 }  }
   
Line 794  struct callinfo info[NFRAMES];
Line 817  struct callinfo info[NFRAMES];
   
 #endif /* SAVE_CALL_CHAIN */  #endif /* SAVE_CALL_CHAIN */
   
 # ifdef SRC_M3  /* Needed by SRC_M3, gcj, and should perhaps be the official interface  */
   /* to GC_dont_gc.                                                       */
 void GC_enable()  void GC_enable()
 {  {
     GC_dont_gc--;      GC_dont_gc--;
Line 804  void GC_disable()
Line 828  void GC_disable()
 {  {
     GC_dont_gc++;      GC_dont_gc++;
 }  }
 # endif  
   
 #if !defined(NO_DEBUGGING)  #if !defined(NO_DEBUGGING)
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>