From: Marion Guthmuller Date: Wed, 1 Aug 2012 20:53:40 +0000 (+0200) Subject: model-checker : count ignore done in heap comparison algorithm X-Git-Tag: v3_8~223 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2554c9160f3c5d661be5e8b42798580cea1cd636?ds=sidebyside model-checker : count ignore done in heap comparison algorithm --- diff --git a/src/xbt/mmalloc/mm_diff.c b/src/xbt/mmalloc/mm_diff.c index 8098a95dc0..395ec57975 100644 --- a/src/xbt/mmalloc/mm_diff.c +++ b/src/xbt/mmalloc/mm_diff.c @@ -88,6 +88,8 @@ void *s_heap, *heapbase1, *heapbase2; malloc_info *heapinfo1, *heapinfo2; size_t heaplimit, heapsize1, heapsize2; +int ignore_done; + int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2){ if(heap1 == NULL && heap1 == NULL){ @@ -123,6 +125,8 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2){ int equal; + ignore_done = 0; + /* Check busy blocks*/ i1 = 1; @@ -386,13 +390,18 @@ static int compare_area(void *area1, void* area2, size_t size, xbt_dynar_t previ while(iheapbase + ((((char *)area1) + i) - (char *)heapbase1); - if((ignore1 = heap_comparison_ignore(current_area1)) > 0){ - current_area2 = (char*)((xbt_mheap_t)s_heap)->heapbase + ((((char *)area2) + i) - (char *)heapbase2); - if((ignore2 = heap_comparison_ignore(current_area2)) == ignore1){ - i = i + ignore2; - continue; + if(ignore_done < xbt_dynar_length(mmalloc_ignore)){ + + current_area1 = (char*)((xbt_mheap_t)s_heap)->heapbase + ((((char *)area1) + i) - (char *)heapbase1); + if((ignore1 = heap_comparison_ignore(current_area1)) > 0){ + current_area2 = (char*)((xbt_mheap_t)s_heap)->heapbase + ((((char *)area2) + i) - (char *)heapbase2); + if((ignore2 = heap_comparison_ignore(current_area2)) == ignore1){ + i = i + ignore2; + ignore_done++; + continue; + } } + } if(memcmp(((char *)area1) + i, ((char *)area2) + i, 1) != 0){