Add the stats.retained and stats.arenas.<i>.retained statistics.

This resolves #367.
This commit is contained in:
Jason Evans
2016-05-03 22:11:35 -07:00
parent c1e9cf47f9
commit 04c3c0f9a0
7 changed files with 70 additions and 6 deletions

View File

@@ -102,6 +102,14 @@ struct arena_stats_s {
/* Number of bytes currently mapped. */
size_t mapped;
/*
* Number of bytes currently retained as a side effect of munmap() being
* disabled/bypassed. Retained bytes are technically mapped (though
* always decommitted or purged), but they are excluded from the mapped
* statistic (above).
*/
size_t retained;
/*
* Total number of purge sweeps, total number of madvise calls made,
* and total pages purged in order to keep dirty unused memory under