[BACK]Return to monitor_mm.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/Attic/monitor_mm.c between version 1.16 and 1.17

version 1.16, 2009/06/22 05:39:28 version 1.17, 2013/05/17 00:13:13
Line 31 
Line 31 
   
 #include <errno.h>  #include <errno.h>
 #include <stdarg.h>  #include <stdarg.h>
   #include <stdlib.h>
 #include <string.h>  #include <string.h>
   
 #include "xmalloc.h"  #include "xmalloc.h"
Line 121 
Line 122 
                 next = RB_NEXT(mmtree, head, mms);                  next = RB_NEXT(mmtree, head, mms);
                 RB_REMOVE(mmtree, head, mms);                  RB_REMOVE(mmtree, head, mms);
                 if (mmalloc == NULL)                  if (mmalloc == NULL)
                         xfree(mms);                          free(mms);
                 else                  else
                         mm_free(mmalloc, mms);                          mm_free(mmalloc, mms);
         }          }
Line 139 
Line 140 
                 fatal("munmap(%p, %lu): %s", mm->address, (u_long)mm->size,                  fatal("munmap(%p, %lu): %s", mm->address, (u_long)mm->size,
                     strerror(errno));                      strerror(errno));
         if (mm->mmalloc == NULL)          if (mm->mmalloc == NULL)
                 xfree(mm);                  free(mm);
         else          else
                 mm_free(mm->mmalloc, mm);                  mm_free(mm->mmalloc, mm);
 }  }
Line 190 
Line 191 
         if (mms->size == 0) {          if (mms->size == 0) {
                 RB_REMOVE(mmtree, &mm->rb_free, mms);                  RB_REMOVE(mmtree, &mm->rb_free, mms);
                 if (mm->mmalloc == NULL)                  if (mm->mmalloc == NULL)
                         xfree(mms);                          free(mms);
                 else                  else
                         mm_free(mm->mmalloc, mms);                          mm_free(mm->mmalloc, mms);
         }          }
Line 246 
Line 247 
                 prev->size += mms->size;                  prev->size += mms->size;
                 RB_REMOVE(mmtree, &mm->rb_free, mms);                  RB_REMOVE(mmtree, &mm->rb_free, mms);
                 if (mm->mmalloc == NULL)                  if (mm->mmalloc == NULL)
                         xfree(mms);                          free(mms);
                 else                  else
                         mm_free(mm->mmalloc, mms);                          mm_free(mm->mmalloc, mms);
         } else          } else
Line 270 
Line 271 
         RB_REMOVE(mmtree, &mm->rb_free, mms);          RB_REMOVE(mmtree, &mm->rb_free, mms);
   
         if (mm->mmalloc == NULL)          if (mm->mmalloc == NULL)
                 xfree(mms);                  free(mms);
         else          else
                 mm_free(mm->mmalloc, mms);                  mm_free(mm->mmalloc, mms);
 }  }

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17