(file) Return to heap.c CVS log (file) (dir) Up to [OMI] / omi / mof

Diff for /omi/mof/heap.c between version 1.4 and 1.5

version 1.4, 2015/04/20 18:19:53 version 1.5, 2015/09/25 20:24:20
Line 25 
Line 25 
 #include <stdio.h> #include <stdio.h>
 #include "heap.h" #include "heap.h"
 #include "types.h" #include "types.h"
   #include <pal/intsafe.h>
  
 #define MAGIC 0x41E25C10 #define MAGIC 0x41E25C10
  
Line 44 
Line 45 
     if (!self)     if (!self)
         return NULL;         return NULL;
  
     p = (MOF_Block*)PAL_Malloc(sizeof(MOF_Block) + size);      size_t allocSize = 0;
       if (SizeTAdd(sizeof(MOF_Block), size, &allocSize) != S_OK)
           return NULL;
   
       p = (MOF_Block*)PAL_Malloc(allocSize);
  
     if (!p)     if (!p)
         return NULL;         return NULL;
Line 79 
Line 84 
     if (!self)     if (!self)
         return NULL;         return NULL;
  
     ptr = MOF_Malloc(self, count * size);      size_t allocSize = 0;
       if (SizeTMult(count, size, &allocSize) != S_OK)
           return NULL;
   
       ptr = MOF_Malloc(self, allocSize);
  
     if (!ptr)     if (!ptr)
         return NULL;         return NULL;


Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

ViewCVS 0.9.2