Algorithmique Numérique Distribuée Public GIT Repository
 author Marion Guthmuller Fri, 17 Aug 2012 07:55:59 +0000 (09:55 +0200) committer shenshei Wed, 28 Nov 2012 07:56:06 +0000 (08:56 +0100)

index e782907..00a845f 100644 (file)
@@ -304,6 +304,48 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac

}

+      if(heapinfo1[i1].busy_block.busy_size == 0){
+        i1++;
+        continue;
+      }
+
+      i2 = 1;
+      equal = 0;
+
+      /* Try first to associate to same block in the other heap */
+      if(heapinfo2[current_block].type == heapinfo1[current_block].type){
+
+        if(heapinfo1[current_block].busy_block.busy_size == heapinfo2[current_block].busy_block.busy_size){
+
+
+          add_heap_area_pair(previous, current_block, -1, current_block, -1);
+
+          if(ignore_done < xbt_dynar_length(mmalloc_ignore)){
+            if(in_mmalloc_ignore((int)current_block, -1))
+            else
+          }else{
+          }
+
+          if(res_compare == 0){
+            for(k=1; k < heapinfo2[current_block].busy_block.size; k++)
+              heapinfo2[current_block+k].busy_block.equal_to = 1 ;
+            for(k=1; k < heapinfo1[current_block].busy_block.size; k++)
+              heapinfo1[current_block+k].busy_block.equal_to = 1 ;
+            equal = 1;
+            match_equals(previous);
+            i1 = i1 + heapinfo1[i1].busy_block.size;
+          }
+
+          xbt_dynar_reset(previous);
+
+        }
+
+      }
+
while(i2 <= heaplimit && !equal){