[BACK]Return to alloc.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / gc

Diff for /OpenXM_contrib2/asir2000/gc/alloc.c between version 1.2 and 1.3

version 1.2, 2000/04/10 08:31:30 version 1.3, 2000/12/01 09:26:10
Line 72  int GC_full_freq = 19;    /* Every 20th collection is 
Line 72  int GC_full_freq = 19;    /* Every 20th collection is 
 GC_bool GC_need_full_gc = FALSE;  GC_bool GC_need_full_gc = FALSE;
                            /* Need full GC do to heap growth.   */                             /* Need full GC do to heap growth.   */
   
 #define USED_HEAP_SIZE (GC_heapsize - GC_large_free_bytes)  
   
 word GC_used_heap_size_after_full = 0;  word GC_used_heap_size_after_full = 0;
   
 char * GC_copyright[] =  char * GC_copyright[] =
Line 311  GC_stop_func stop_func;
Line 309  GC_stop_func stop_func;
     /* Make sure all blocks have been reclaimed, so sweep routines      */      /* Make sure all blocks have been reclaimed, so sweep routines      */
     /* don't see cleared mark bits.                                     */      /* don't see cleared mark bits.                                     */
     /* If we're guaranteed to finish, then this is unnecessary.         */      /* If we're guaranteed to finish, then this is unnecessary.         */
         if (stop_func != GC_never_stop_func      /* In the find_leak case, we have to finish to guarantee that       */
       /* previously unmarked objects are not reported as leaks.           */
           if ((GC_find_leak || stop_func != GC_never_stop_func)
             && !GC_reclaim_all(stop_func, FALSE)) {              && !GC_reclaim_all(stop_func, FALSE)) {
             /* Aborted.  So far everything is still consistent. */              /* Aborted.  So far everything is still consistent. */
             return(FALSE);              return(FALSE);
Line 659  word bytes;
Line 659  word bytes;
     if (GC_n_heap_sects >= MAX_HEAP_SECTS) {      if (GC_n_heap_sects >= MAX_HEAP_SECTS) {
         ABORT("Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS");          ABORT("Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS");
     }      }
     if (!GC_install_header(p)) {      phdr = GC_install_header(p);
       if (0 == phdr) {
         /* This is extremely unlikely. Can't add it.  This will         */          /* This is extremely unlikely. Can't add it.  This will         */
         /* almost certainly result in a 0 return from the allocator,    */          /* almost certainly result in a 0 return from the allocator,    */
         /* which is entirely appropriate.                               */          /* which is entirely appropriate.                               */
Line 669  word bytes;
Line 670  word bytes;
     GC_heap_sects[GC_n_heap_sects].hs_bytes = bytes;      GC_heap_sects[GC_n_heap_sects].hs_bytes = bytes;
     GC_n_heap_sects++;      GC_n_heap_sects++;
     words = BYTES_TO_WORDS(bytes - HDR_BYTES);      words = BYTES_TO_WORDS(bytes - HDR_BYTES);
     phdr = HDR(p);  
     phdr -> hb_sz = words;      phdr -> hb_sz = words;
     phdr -> hb_map = (char *)1;   /* A value != GC_invalid_map  */      phdr -> hb_map = (char *)1;   /* A value != GC_invalid_map  */
     phdr -> hb_flags = 0;      phdr -> hb_flags = 0;
Line 821  word n;
Line 821  word n;
     LOCK();      LOCK();
     if (!GC_is_initialized) GC_init_inner();      if (!GC_is_initialized) GC_init_inner();
     result = (int)GC_expand_hp_inner(divHBLKSZ((word)bytes));      result = (int)GC_expand_hp_inner(divHBLKSZ((word)bytes));
       if (result) GC_requested_heapsize += bytes;
     UNLOCK();      UNLOCK();
     ENABLE_SIGNALS();      ENABLE_SIGNALS();
     return(result);      return(result);
Line 834  GC_bool GC_collect_or_expand(needed_blocks, ignore_off
Line 835  GC_bool GC_collect_or_expand(needed_blocks, ignore_off
 word needed_blocks;  word needed_blocks;
 GC_bool ignore_off_page;  GC_bool ignore_off_page;
 {  {
     if (!GC_incremental && !GC_dont_gc && GC_should_collect()) {      if (!GC_incremental && !GC_dont_gc &&
           (GC_dont_expand && GC_words_allocd > 0 || GC_should_collect())) {
       GC_notify_full_gc();        GC_notify_full_gc();
       GC_gcollect_inner();        GC_gcollect_inner();
     } else {      } else {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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