Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : block 0 (mdp->heapinfo[0]) removed in comparison of heap in mmalloc_c...
[simgrid.git] / src / xbt / mmalloc / mm_legacy.c
index 427d0b0..6ed27cc 100644 (file)
@@ -175,19 +175,11 @@ int mmalloc_compare_heap(void *h1, void *h2){
     return 0;
   }
 
-  XBT_DEBUG("Blocksize : %Zu - Heap : %Zu", BLOCKSIZE, HEAP);
-
   /* Heapstats */
 
   struct mstats ms1 = mmstats(h1);
   struct mstats ms2 = mmstats(h2);
 
-  if(ms1.bytes_total !=  ms2.bytes_total){
-    XBT_DEBUG("Different total size of the heap : %Zu - %Zu", ms1.bytes_total, ms2.bytes_total );
-    return 1;
-  }
-
   if(ms1.chunks_used !=  ms2.chunks_used){
     XBT_DEBUG("Different chunks allocated by the user : %Zu - %Zu", ms1.chunks_used, ms2.chunks_used);
     return 1;
@@ -211,12 +203,9 @@ int mmalloc_compare_heap(void *h1, void *h2){
   struct mdesc *mdp1, *mdp2;
   mdp1 = MD_TO_MDP(h1);
   mdp2 = MD_TO_MDP(h2);
-  
-  if(mmalloc_compare_mdesc(mdp1, mdp2))
-    return 1;
-  
 
-  return 0;
+  return mmalloc_compare_mdesc(mdp1, mdp2);
+
 }
 
 int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2){
@@ -414,7 +403,7 @@ int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2){
        }
        i = block_free + mdp1->heapinfo[block_free].free.size;
       }else{
-       i = 0;
+       i = 1;
       }
     }