From: Marion Guthmuller Date: Fri, 9 Nov 2012 17:33:19 +0000 (+0100) Subject: model-checker : getter function for chunks used in heap X-Git-Tag: v3_9_rc1~91^2~126^2~10 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7e02819630f97eb2bd43ff422d156cc8a60929c5?hp=f8db3884110dda1330177a0b6b76a3dc47154244 model-checker : getter function for chunks used in heap --- diff --git a/include/xbt/mmalloc.h b/include/xbt/mmalloc.h index 74904083c6..e3b5b10807 100644 --- a/include/xbt/mmalloc.h +++ b/include/xbt/mmalloc.h @@ -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 */ diff --git a/src/xbt/mmalloc/mm_module.c b/src/xbt/mmalloc/mm_module.c index cd4ef278da..de1942a764 100644 --- a/src/xbt/mmalloc/mm_module.c +++ b/src/xbt/mmalloc/mm_module.c @@ -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; +}