Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Avoid to fail when we cannot read the output of addr2line.
[simgrid.git] / src / xbt / mmalloc / mfree.c
index e8242f6..01cf670 100644 (file)
@@ -35,6 +35,7 @@ void mfree(struct mdesc *mdp, void *ptr)
     abort();
   }
 
+  check_fraghead(mdp);
 
   type = mdp->heapinfo[block].type;
 
@@ -134,7 +135,9 @@ void mfree(struct mdesc *mdp, void *ptr)
           mdp -> heapstats.bytes_free -= bytes;
           } */
 
-    /* Set the next search to begin at this block.  */
+    /* Set the next search to begin at this block.  
+       This is probably important to the trick where realloc returns the block to 
+       the system before reasking for the same block with a bigger size.  */
     mdp->heapindex = block;
     break;
 
@@ -212,4 +215,6 @@ void mfree(struct mdesc *mdp, void *ptr)
     }
     break;
   }
+
+  check_fraghead(mdp);
 }