X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ea39fd08c260e7faa92334952d4acd37e3892b6c..c59fb90ea83ce58355bc388b1a5ebaef96420806:/src/xbt/mmalloc/mfree.c?ds=sidebyside diff --git a/src/xbt/mmalloc/mfree.c b/src/xbt/mmalloc/mfree.c index af8372068e..e9031ebdf6 100644 --- a/src/xbt/mmalloc/mfree.c +++ b/src/xbt/mmalloc/mfree.c @@ -157,7 +157,8 @@ void mfree(struct mdesc *mdp, void *ptr) /* Set size used in the fragment to -1 */ mdp->heapinfo[block].busy_frag.frag_size[frag_nb] = -1; - + mdp->heapinfo[block].busy_frag.ignore[frag_nb] = 0; + // fprintf(stderr,"nfree:%zu capa:%d\n", mdp->heapinfo[block].busy_frag.nfree,(BLOCKSIZE >> type)); if (mdp->heapinfo[block].busy_frag.nfree == (BLOCKSIZE >> type) - 1) { @@ -168,7 +169,8 @@ void mfree(struct mdesc *mdp, void *ptr) mdp->heapinfo[block].type = 0; mdp->heapinfo[block].busy_block.size = 1; mdp->heapinfo[block].busy_block.busy_size = 0; - + mdp->heapinfo[block].busy_block.ignore = 0; + /* Keep the statistics accurate. */ mdp -> heapstats.chunks_used++; mdp -> heapstats.bytes_used += BLOCKSIZE; @@ -192,3 +194,4 @@ void mfree(struct mdesc *mdp, void *ptr) break; } } +