Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : comment backtrace and add ignore mechanism in mmalloc metadata
[simgrid.git] / src / xbt / mmalloc / mfree.c
index af83720..e9031eb 100644 (file)
@@ -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;
   }
 }
+