X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3d28e83ea2a5f93c7654087eb70ab2e873553628..fd0c81491963b25dab20bce41bdc3a66b5a936d6:/src/xbt/mmalloc/mm_diff.c diff --git a/src/xbt/mmalloc/mm_diff.c b/src/xbt/mmalloc/mm_diff.c index c7e56c1ec6..9b6de46984 100644 --- a/src/xbt/mmalloc/mm_diff.c +++ b/src/xbt/mmalloc/mm_diff.c @@ -209,6 +209,7 @@ int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2, void* s_heap, int k; int distance = 0; + int total_distance = 0; void *end_heap = get_end_addr_heap(s_heap); @@ -334,6 +335,7 @@ int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2, void* s_heap, mmalloc_backtrace_block_display(mdp1, i); mmalloc_backtrace_block_display(mdp2, i); errors++; + total_distance += distance; } @@ -450,6 +452,7 @@ int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2, void* s_heap, mmalloc_backtrace_fragment_display(mdp1, i, j); mmalloc_backtrace_fragment_display(mdp2, i, j); errors++; + total_distance += distance; } @@ -473,6 +476,8 @@ int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2, void* s_heap, //free(pointed_address1); //free(pointed_address2); + fprintf(stderr, "Hamming distance between heap regions : %d\n", total_distance); + return (errors); }