Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : add backtrace when large block(s) mallocated in the existing heap
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Tue, 21 Feb 2012 14:59:19 +0000 (15:59 +0100)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Tue, 21 Feb 2012 14:59:19 +0000 (15:59 +0100)
src/xbt/mmalloc/mmalloc.c

index 1205be3..64041ef 100644 (file)
@@ -265,7 +265,8 @@ void *mmalloc(xbt_mheap_t mdp, size_t size)
        mdp->heapinfo[block+it].type = 0;
     mdp->heapinfo[block].busy_block.size = blocks;
     mdp->heapinfo[block].busy_block.busy_size = requested_size;
-    mdp->heapinfo[block].busy_block.bt_size = 0;
+    //mdp->heapinfo[block].busy_block.bt_size = 0;
+    mdp->heapinfo[block].busy_block.bt_size = xbt_backtrace_no_malloc(mdp->heapinfo[block].busy_block.bt,XBT_BACKTRACE_SIZE);
   }
   //printf("(%s) Done mallocing. Result is %p\n",xbt_thread_self_name(),result);fflush(stdout);
   return (result);