File tree 3 files changed +8
-8
lines changed 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ namespace snmalloc
11
11
using ABAT = ABA<T, c>;
12
12
13
13
private:
14
- ABAT stack;
14
+ alignas (CACHELINE_SIZE) ABAT stack;
15
15
16
16
public:
17
17
constexpr MPMCStack () = default;
Original file line number Diff line number Diff line change @@ -79,6 +79,12 @@ namespace snmalloc
79
79
ModArray<NUM_SLAB_SIZES, MPMCStack<ChunkRecord, RequiresInit>>
80
80
decommitted_chunk_stack;
81
81
82
+ /* *
83
+ * Which is the current epoch to place dealloced chunks, and the
84
+ * first place we look for allocating chunks.
85
+ */
86
+ alignas (CACHELINE_SIZE) std::atomic<size_t > epoch{0 };
87
+
82
88
/* *
83
89
* All memory issued by this address space manager
84
90
*/
@@ -88,12 +94,6 @@ namespace snmalloc
88
94
89
95
std::atomic<ChunkAllocatorLocalState*> all_local{nullptr };
90
96
91
- /* *
92
- * Which is the current epoch to place dealloced chunks, and the
93
- * first place we look for allocating chunks.
94
- */
95
- std::atomic<size_t > epoch{0 };
96
-
97
97
// Flag to ensure one-shot registration with the PAL for notifications.
98
98
std::atomic_flag register_decay{};
99
99
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ namespace snmalloc
28
28
friend class Pool;
29
29
30
30
private:
31
- std::atomic_flag lock = ATOMIC_FLAG_INIT;
32
31
MPMCStack<T, PreZeroed> stack;
32
+ std::atomic_flag lock = ATOMIC_FLAG_INIT;
33
33
T* list{nullptr };
34
34
35
35
public:
You can’t perform that action at this time.
0 commit comments