X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/bdcdd551631a0c21d9db10f44aa6c25ee0336d17..6d215aa449fe86894819be267aa2ae30cb5b151c:/src/xbt/mmalloc/mmprivate.h diff --git a/src/xbt/mmalloc/mmprivate.h b/src/xbt/mmalloc/mmprivate.h index 4273e0d4a9..d0eb81c30e 100644 --- a/src/xbt/mmalloc/mmprivate.h +++ b/src/xbt/mmalloc/mmprivate.h @@ -96,6 +96,16 @@ struct list { struct list *prev; }; +/* Statistics available to the user. */ +struct mstats +{ + size_t bytes_total; /* Total size of the heap. */ + size_t chunks_used; /* Chunks allocated by the user. */ + size_t bytes_used; /* Byte total of user-allocated chunks. */ + size_t chunks_free; /* Chunks in the free list. */ + size_t bytes_free; /* Byte total of chunks in the free list. */ +}; + /* Data structure giving per-block information. * * There is one such structure in the mdp->heapinfo array per block used in that heap, @@ -222,6 +232,10 @@ struct mdesc { int fd; + /* Instrumentation. */ + + struct mstats heapstats; + }; int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2);