Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : get size used (heapinfo meta-data)
[simgrid.git] / src / xbt / mmalloc / mm_diff.c
index d1f021a..c501bcc 100644 (file)
@@ -347,8 +347,7 @@ void reset_heap_information(){
     if(heapinfo1[i].type == 0){
       heap_area_free(heapinfo1[i].busy_block.equal_to);
       heapinfo1[i].busy_block.equal_to = NULL;
-    }
-    if(heapinfo1[i].type > 0){
+    }else if(heapinfo1[i].type > 0){
       for(j=0; j < (size_t) (BLOCKSIZE >> heapinfo1[i].type); j++){
         heap_area_free(heapinfo1[i].busy_frag.equal_to[j]);
         heapinfo1[i].busy_frag.equal_to[j] = NULL;
@@ -363,8 +362,7 @@ void reset_heap_information(){
     if(heapinfo2[i].type == 0){
       heap_area_free(heapinfo2[i].busy_block.equal_to);
       heapinfo2[i].busy_block.equal_to = NULL;
-    }
-    if(heapinfo2[i].type > 0){
+    }else if(heapinfo2[i].type > 0){
       for(j=0; j < (size_t) (BLOCKSIZE >> heapinfo2[i].type); j++){
         heap_area_free(heapinfo2[i].busy_frag.equal_to[j]);
         heapinfo2[i].busy_frag.equal_to[j] = NULL;
@@ -758,7 +756,7 @@ static int compare_heap_area_with_type(void *real_area1, void *real_area2, void
   case e_dw_base_type:
     if((check_ignore > 0) && ((ignore1 = heap_comparison_ignore_size(to_ignore1, real_area1)) > 0) && ((ignore2 = heap_comparison_ignore_size(to_ignore2, real_area2))  == ignore1))
       return 0;
-    if(strcmp(type->name, "char") == 0){ /* Chaine de caractères, donc taille alĂ©atoire */
+    if(strcmp(type->name, "char") == 0){ /* String, hence random (arbitrary ?) size */
       return (memcmp(area1, area2, area_size) != 0);
     }else{
       if(area_size != -1 && type->size != area_size)