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

Diff for /OpenXM_contrib/gc/Attic/mallocx.c between version 1.1.1.1 and 1.1.1.3

version 1.1.1.1, 1999/11/27 10:58:32 version 1.1.1.3, 2000/12/01 14:48:25
Line 57  register int k;
Line 57  register int k;
     if(GC_incremental && !GC_dont_gc)      if(GC_incremental && !GC_dont_gc)
         GC_collect_a_little_inner((int)n_blocks);          GC_collect_a_little_inner((int)n_blocks);
     lw = ROUNDED_UP_WORDS(lb);      lw = ROUNDED_UP_WORDS(lb);
     while ((h = GC_allochblk(lw, k, IGNORE_OFF_PAGE)) == 0      h = GC_allochblk(lw, k, IGNORE_OFF_PAGE);
            && GC_collect_or_expand(n_blocks, TRUE));  #   ifdef USE_MUNMAP
         if (0 == h) {
           GC_merge_unmapped();
           h = GC_allochblk(lw, k, IGNORE_OFF_PAGE);
         }
   #   endif
       while (0 == h && GC_collect_or_expand(n_blocks, TRUE)) {
         h = GC_allochblk(lw, k, IGNORE_OFF_PAGE);
       }
     if (h == 0) {      if (h == 0) {
         op = 0;          op = 0;
     } else {      } else {
Line 126  void GC_incr_mem_freed(size_t n)
Line 134  void GC_incr_mem_freed(size_t n)
   
 /* Analogous to the above, but assumes a small object size, and         */  /* Analogous to the above, but assumes a small object size, and         */
 /* bypasses MERGE_SIZES mechanism.  Used by gc_inline.h.                */  /* bypasses MERGE_SIZES mechanism.  Used by gc_inline.h.                */
 #ifdef __STDC__  ptr_t GC_generic_malloc_words_small_inner(lw, k)
      ptr_t GC_generic_malloc_words_small(size_t lw, int k)  register word lw;
 #else  register int k;
      ptr_t GC_generic_malloc_words_small(lw, k)  
      register word lw;  
      register int k;  
 #endif  
 {  {
 register ptr_t op;  register ptr_t op;
 register ptr_t *opp;  register ptr_t *opp;
 register struct obj_kind * kind = GC_obj_kinds + k;  register struct obj_kind * kind = GC_obj_kinds + k;
 DCL_LOCK_STATE;  
   
     GC_INVOKE_FINALIZERS();  
     DISABLE_SIGNALS();  
     LOCK();  
     opp = &(kind -> ok_freelist[lw]);      opp = &(kind -> ok_freelist[lw]);
     if( (op = *opp) == 0 ) {      if( (op = *opp) == 0 ) {
         if (!GC_is_initialized) {          if (!GC_is_initialized) {
Line 159  DCL_LOCK_STATE;
Line 159  DCL_LOCK_STATE;
     *opp = obj_link(op);      *opp = obj_link(op);
     obj_link(op) = 0;      obj_link(op) = 0;
     GC_words_allocd += lw;      GC_words_allocd += lw;
       return((ptr_t)op);
   }
   
   /* Analogous to the above, but assumes a small object size, and         */
   /* bypasses MERGE_SIZES mechanism.  Used by gc_inline.h.                */
   #ifdef __STDC__
        ptr_t GC_generic_malloc_words_small(size_t lw, int k)
   #else
        ptr_t GC_generic_malloc_words_small(lw, k)
        register word lw;
        register int k;
   #endif
   {
   register ptr_t op;
   DCL_LOCK_STATE;
   
       GC_INVOKE_FINALIZERS();
       DISABLE_SIGNALS();
       LOCK();
       op = GC_generic_malloc_words_small_inner(lw, k);
     UNLOCK();      UNLOCK();
     ENABLE_SIGNALS();      ENABLE_SIGNALS();
     return((ptr_t)op);      return((ptr_t)op);

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

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