summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2017-02-13 19:02:32 (GMT)
committerJason Evans <jasone@canonware.com>2017-02-16 17:39:46 (GMT)
commitf8fee6908d554aaa4f356bfcf7642bc7707eb6df (patch)
treed36b9b30b786c456b9ae4937abcb4cd8797e2b39 /include
parentd433471f581ca50583c7a99f9802f7388f81aa36 (diff)
downloadjemalloc-f8fee6908d554aaa4f356bfcf7642bc7707eb6df.zip
jemalloc-f8fee6908d554aaa4f356bfcf7642bc7707eb6df.tar.gz
jemalloc-f8fee6908d554aaa4f356bfcf7642bc7707eb6df.tar.bz2
Synchronize arena->decay with arena->decay.mtx.
This removes the last use of arena->lock.
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/arena_inlines_b.h2
-rw-r--r--include/jemalloc/internal/arena_structs_b.h8
-rw-r--r--include/jemalloc/internal/witness_types.h2
3 files changed, 4 insertions, 8 deletions
diff --git a/include/jemalloc/internal/arena_inlines_b.h b/include/jemalloc/internal/arena_inlines_b.h
index a180322..275866a 100644
--- a/include/jemalloc/internal/arena_inlines_b.h
+++ b/include/jemalloc/internal/arena_inlines_b.h
@@ -81,7 +81,7 @@ arena_decay_ticks(tsdn_t *tsdn, arena_t *arena, unsigned nticks) {
JEMALLOC_ALWAYS_INLINE void
arena_decay_tick(tsdn_t *tsdn, arena_t *arena) {
- malloc_mutex_assert_not_owner(tsdn, &arena->lock);
+ malloc_mutex_assert_not_owner(tsdn, &arena->decay.mtx);
arena_decay_ticks(tsdn, arena, 1);
}
diff --git a/include/jemalloc/internal/arena_structs_b.h b/include/jemalloc/internal/arena_structs_b.h
index 132a328..92f1e41 100644
--- a/include/jemalloc/internal/arena_structs_b.h
+++ b/include/jemalloc/internal/arena_structs_b.h
@@ -37,6 +37,8 @@ struct arena_bin_info_s {
};
struct arena_decay_s {
+ /* Synchronizes all fields. */
+ malloc_mutex_t mtx;
/*
* Approximate time in seconds from the creation of a set of unused
* dirty pages until an equivalent set of unused dirty pages is purged
@@ -121,12 +123,6 @@ struct arena_s {
*/
unsigned nthreads[2];
- /*
- * Synchronizes various arena operations, as indicated in field-specific
- * comments.
- */
- malloc_mutex_t lock;
-
/* Synchronization: internal. */
arena_stats_t stats;
diff --git a/include/jemalloc/internal/witness_types.h b/include/jemalloc/internal/witness_types.h
index 7957b41..0678b08 100644
--- a/include/jemalloc/internal/witness_types.h
+++ b/include/jemalloc/internal/witness_types.h
@@ -34,7 +34,7 @@ typedef int witness_comp_t (const witness_t *, void *, const witness_t *,
*/
#define WITNESS_RANK_CORE 9U
-#define WITNESS_RANK_ARENA 9U
+#define WITNESS_RANK_DECAY 9U
#define WITNESS_RANK_TCACHE_QL 10U
#define WITNESS_RANK_EXTENTS 11U
#define WITNESS_RANK_EXTENT_FREELIST 12U