From: Marion Guthmuller Date: Tue, 5 Mar 2013 20:38:32 +0000 (+0100) Subject: model-checker : set ignore flag to 0 if reallocation X-Git-Tag: v3_9_90~448 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/8d38503da91e1cc122581ca0d34b5181c78d41bd model-checker : set ignore flag to 0 if reallocation --- diff --git a/src/xbt/mmalloc/mrealloc.c b/src/xbt/mmalloc/mrealloc.c index b9deaffdde..40d8c7204d 100644 --- a/src/xbt/mmalloc/mrealloc.c +++ b/src/xbt/mmalloc/mrealloc.c @@ -91,6 +91,7 @@ void *mrealloc(xbt_mheap_t mdp, void *ptr, size_t size) mdp->heapinfo[block].busy_block.size = blocks; mdp->heapinfo[block].busy_block.busy_size = requested_size; + mdp->heapinfo[block].busy_block.ignore = 0; result = ptr; } else if (blocks == mdp->heapinfo[block].busy_block.size) { @@ -98,6 +99,7 @@ void *mrealloc(xbt_mheap_t mdp, void *ptr, size_t size) /* No block size change necessary; only update the requested size */ result = ptr; mdp->heapinfo[block].busy_block.busy_size = requested_size; + mdp->heapinfo[block].busy_block.ignore = 0; } else { /* Won't fit, so allocate a new region that will. @@ -129,6 +131,7 @@ void *mrealloc(xbt_mheap_t mdp, void *ptr, size_t size) result = ptr; int frag_nb = RESIDUAL(result, BLOCKSIZE) >> type; mdp->heapinfo[block].busy_frag.frag_size[frag_nb] = requested_size; + mdp->heapinfo[block].busy_frag.ignore[frag_nb] = 0; } else { /* fragment -> Either other fragment, or block */ /* The new size is different; allocate a new space,