Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : getter function for chunks used in heap
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Fri, 9 Nov 2012 17:33:19 +0000 (18:33 +0100)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Fri, 9 Nov 2012 17:33:19 +0000 (18:33 +0100)
include/xbt/mmalloc.h
src/xbt/mmalloc/mm_module.c

index 7490408..e3b5b10 100644 (file)
@@ -70,6 +70,8 @@ void mmalloc_backtrace_display(void *addr);
 
 int is_free_area(void *area, xbt_mheap_t heap);
 
+size_t mmalloc_get_chunks_used(xbt_mheap_t);
+
 
 
 #endif                          /* MMALLOC_H */
index cd4ef27..de1942a 100644 (file)
@@ -339,3 +339,7 @@ void mmalloc_postexit(void)
   //  mmalloc_detach(__mmalloc_default_mdp);
   xbt_mheap_destroy_no_free(__mmalloc_default_mdp);
 }
+
+size_t mmalloc_get_chunks_used(xbt_mheap_t heap){
+  return ((struct mdesc *)heap)->heapstats.chunks_used;
+}