+
+ while(i2 <= state->heaplimit && !equal){
+
+ if(state->heapinfo2[i2].type <= 0){
+ i2++;
+ continue;
+ }
+
+ for(j2=0; j2 < (size_t) (BLOCKSIZE >> state->heapinfo2[i2].type); j2++){
+
+ if(i2 == i1 && j2 == j1)
+ continue;
+
+ if(state->equals_to2_(i2,j2) != NULL)
+ continue;
+
+ addr_block2 = ((void*) (((ADDR2UINT(i2)) - 1) * BLOCKSIZE + (char*)((xbt_mheap_t)state->s_heap)->heapbase));
+ addr_frag2 = (void*) ((char *)addr_block2 + (j2 <<((xbt_mheap_t)state->s_heap)->heapinfo[i2].type));
+
+ res_compare = compare_heap_area(addr_frag1, addr_frag2, snapshot2, snapshot2, NULL, NULL, 0);
+
+ if(res_compare != 1){
+ equal = 1;
+ xbt_dynar_reset(previous);
+ break;
+ }
+
+ xbt_dynar_reset(previous);
+
+ }
+
+ i2++;
+
+ }
+
+ if(!equal){
+ XBT_DEBUG("Block %zu, fragment %zu not found (size_used = %zd, address = %p)\n", i1, j1, state->heapinfo1[i1].busy_frag.frag_size[j1], addr_frag1);
+ i2 = state->heaplimit + 1;
+ i1 = state->heaplimit + 1;
+ nb_diff1++;
+ break;
+ }
+
+ }
+
+ i1++;
+
+ }
+
+ }
+
+ /* All blocks/fragments are equal to another block/fragment ? */
+ size_t i = 1, j = 0;
+ void *real_addr_frag1 = NULL, *real_addr_block1 = NULL, *real_addr_block2 = NULL, *real_addr_frag2 = NULL;
+
+ while(i<=state->heaplimit){
+ if(state->heapinfo1[i].type == 0){
+ if(i1 == state->heaplimit){
+ if(state->heapinfo1[i].busy_block.busy_size > 0){
+ if(state->equals_to1_(i,0) == NULL){
+ if(XBT_LOG_ISENABLED(mm_diff, xbt_log_priority_debug)){
+ addr_block1 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)state->heapbase1));
+ XBT_DEBUG("Block %zu (%p) not found (size used = %zu)", i, addr_block1, state->heapinfo1[i].busy_block.busy_size);
+ //mmalloc_backtrace_block_display((void*)heapinfo1, i);
+ }
+ nb_diff1++;
+ }
+ }
+ }
+ }
+ if(state->heapinfo1[i].type > 0){
+ addr_block1 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)state->heapbase1));
+ real_addr_block1 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)((struct mdesc *)state->s_heap)->heapbase));
+ for(j=0; j < (size_t) (BLOCKSIZE >> state->heapinfo1[i].type); j++){
+ if(i1== state->heaplimit){
+ if(state->heapinfo1[i].busy_frag.frag_size[j] > 0){
+ if(state->equals_to1_(i,j) == NULL){
+ if(XBT_LOG_ISENABLED(mm_diff, xbt_log_priority_debug)){
+ addr_frag1 = (void*) ((char *)addr_block1 + (j << state->heapinfo1[i].type));
+ real_addr_frag1 = (void*) ((char *)real_addr_block1 + (j << ((struct mdesc *)state->s_heap)->heapinfo[i].type));
+ XBT_DEBUG("Block %zu, Fragment %zu (%p - %p) not found (size used = %zd)", i, j, addr_frag1, real_addr_frag1, state->heapinfo1[i].busy_frag.frag_size[j]);
+ //mmalloc_backtrace_fragment_display((void*)heapinfo1, i, j);
+ }
+ nb_diff1++;
+ }
+ }
+ }
+ }
+ }
+ i++;
+ }
+
+ if(i1 == state->heaplimit)
+ XBT_DEBUG("Number of blocks/fragments not found in heap1 : %d", nb_diff1);
+
+ i = 1;
+
+ while(i<=state->heaplimit){
+ if(state->heapinfo2[i].type == 0){
+ if(i1 == state->heaplimit){
+ if(state->heapinfo2[i].busy_block.busy_size > 0){
+ if(state->equals_to2_(i,0) == NULL){
+ if(XBT_LOG_ISENABLED(mm_diff, xbt_log_priority_debug)){
+ addr_block2 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)state->heapbase2));
+ XBT_DEBUG("Block %zu (%p) not found (size used = %zu)", i, addr_block2, state->heapinfo2[i].busy_block.busy_size);
+ //mmalloc_backtrace_block_display((void*)heapinfo2, i);
+ }
+ nb_diff2++;
+ }
+ }
+ }
+ }
+ if(state->heapinfo2[i].type > 0){
+ addr_block2 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)state->heapbase2));
+ real_addr_block2 = ((void*) (((ADDR2UINT(i)) - 1) * BLOCKSIZE + (char*)((struct mdesc *)state->s_heap)->heapbase));
+ for(j=0; j < (size_t) (BLOCKSIZE >> state->heapinfo2[i].type); j++){
+ if(i1 == state->heaplimit){
+ if(state->heapinfo2[i].busy_frag.frag_size[j] > 0){
+ if(state->equals_to2_(i,j) == NULL){
+ if(XBT_LOG_ISENABLED(mm_diff, xbt_log_priority_debug)){
+ addr_frag2 = (void*) ((char *)addr_block2 + (j << state->heapinfo2[i].type));
+ real_addr_frag2 = (void*) ((char *)real_addr_block2 + (j << ((struct mdesc *)state->s_heap)->heapinfo[i].type));
+ XBT_DEBUG( "Block %zu, Fragment %zu (%p - %p) not found (size used = %zd)", i, j, addr_frag2, real_addr_frag2, state->heapinfo2[i].busy_frag.frag_size[j]);
+ //mmalloc_backtrace_fragment_display((void*)heapinfo2, i, j);
+ }
+ nb_diff2++;
+ }
+ }
+ }
+ }
+ }
+ i++;
+ }
+
+ if(i1 == state->heaplimit)
+ XBT_DEBUG("Number of blocks/fragments not found in heap2 : %d", nb_diff2);
+
+ xbt_dynar_free(&previous);
+ real_addr_frag1 = NULL, real_addr_block1 = NULL, real_addr_block2 = NULL, real_addr_frag2 = NULL;
+
+ return ((nb_diff1 > 0) || (nb_diff2 > 0));
+}
+
+/**
+ *
+ * @param state
+ * @param real_area1 Process address for state 1
+ * @param real_area2 Process address for state 2
+ * @param area1 Snapshot address for state 1
+ * @param area2 Snapshot address for state 2
+ * @param snapshot1 Snapshot of state 1
+ * @param snapshot2 Snapshot of state 2
+ * @param previous
+ * @param size
+ * @param check_ignore
+ */
+static int compare_heap_area_without_type(struct s_mm_diff *state, void *real_area1, void *real_area2, void *area1, void *area2, mc_snapshot_t snapshot1, mc_snapshot_t snapshot2, xbt_dynar_t previous, int size, int check_ignore){
+
+ int i = 0;
+ void *addr_pointed1, *addr_pointed2;
+ int pointer_align, res_compare;
+ ssize_t ignore1, ignore2;
+
+ while(i<size){
+
+ if(check_ignore > 0){
+ if((ignore1 = heap_comparison_ignore_size(state->to_ignore1, (char *)real_area1 + i)) != -1){
+ if((ignore2 = heap_comparison_ignore_size(state->to_ignore2, (char *)real_area2 + i)) == ignore1){
+ if(ignore1 == 0){
+ check_ignore--;
+ return 0;