X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3ca7b9a135ee10337486c6473f582419c5c23241..14a69c191a473f265fb15fe827e31bcc12b39364:/src/xbt/mmalloc/mfree.c?ds=sidebyside diff --git a/src/xbt/mmalloc/mfree.c b/src/xbt/mmalloc/mfree.c index 754ff3098b..cbdea22070 100644 --- a/src/xbt/mmalloc/mfree.c +++ b/src/xbt/mmalloc/mfree.c @@ -153,12 +153,12 @@ void mfree(struct mdesc *mdp, void *ptr) /* Set size used in the fragment to 0 */ frag_nb = RESIDUAL(ptr, BLOCKSIZE) >> type; - if( mdp->heapinfo[block].busy_frag.frag_size[frag_nb] == 0){ + if( mdp->heapinfo[block].busy_frag.frag_size[frag_nb] == -1){ UNLOCK(mdp); THROWF(system_error, 0, "Asked to free a fragment that is already free. I'm puzzled\n"); } - mdp->heapinfo[block].busy_frag.frag_size[frag_nb] = 0; + mdp->heapinfo[block].busy_frag.frag_size[frag_nb] = -1; if (mdp->heapinfo[block].busy_frag.nfree == (BLOCKSIZE >> type) - 1) {