X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1a8e5af34045d9f65169ce4766b0131dfe7825f2..c59fb90ea83ce58355bc388b1a5ebaef96420806:/src/xbt/mmalloc/mfree.c diff --git a/src/xbt/mmalloc/mfree.c b/src/xbt/mmalloc/mfree.c index b11e21e680..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;