summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2017-03-04 04:44:39 (GMT)
committerJason Evans <jasone@canonware.com>2017-03-04 16:18:31 (GMT)
commit04d8fcb74563a305bdaa8d3ee3ba6ba49d09dfb8 (patch)
tree7930db80699503cfc88cb1e89e136c55e33a07c9 /include
parentd4ac7582f32f506d5203bea2f0115076202add38 (diff)
downloadjemalloc-04d8fcb74563a305bdaa8d3ee3ba6ba49d09dfb8.zip
jemalloc-04d8fcb74563a305bdaa8d3ee3ba6ba49d09dfb8.tar.gz
jemalloc-04d8fcb74563a305bdaa8d3ee3ba6ba49d09dfb8.tar.bz2
Optimize malloc_large_stats_t maintenance.
Convert the nrequests field to be partially derived, and the curlextents to be fully derived, in order to reduce the number of stats updates needed during common operations. This change affects ndalloc stats during arena reset, because it is no longer possible to cancel out ndalloc effects (curlextents would become negative).
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/stats_structs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/jemalloc/internal/stats_structs.h b/include/jemalloc/internal/stats_structs.h
index 354f93e..06ba95f 100644
--- a/include/jemalloc/internal/stats_structs.h
+++ b/include/jemalloc/internal/stats_structs.h
@@ -64,10 +64,10 @@ struct malloc_large_stats_s {
* This includes requests served by tcache, though tcache only
* periodically merges into this counter.
*/
- uint64_t nrequests;
+ uint64_t nrequests; /* Partially derived. */
/* Current number of allocations of this size class. */
- size_t curlextents;
+ size_t curlextents; /* Derived. */
};
/*