File tree Expand file tree Collapse file tree 9 files changed +18
-0
lines changed
Expand file tree Collapse file tree 9 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ namespace snmalloc
2525
2626 static constexpr bool Aligned = ParentRange::Aligned;
2727
28+ static constexpr bool ConcurrencySafe = ParentRange::ConcurrencySafe;
29+
2830 constexpr CommitRange () = default;
2931
3032 capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ namespace snmalloc
1919
2020 static constexpr bool Aligned = true ;
2121
22+ static constexpr bool ConcurrencySafe = true ;
23+
2224 constexpr EmptyRange () = default;
2325
2426 capptr::Chunk<void > alloc_range (size_t )
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ namespace snmalloc
3737
3838 static constexpr bool Aligned = ParentRange::Aligned;
3939
40+ static constexpr bool ConcurrencySafe = true ;
41+
4042 constexpr GlobalRange () = default;
4143
4244 capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -271,6 +271,8 @@ namespace snmalloc
271271
272272 static constexpr bool Aligned = true ;
273273
274+ static constexpr bool ConcurrencySafe = false ;
275+
274276 constexpr LargeBuddyRange () = default;
275277
276278 capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ namespace snmalloc
3030
3131 static constexpr bool Aligned = ParentRange::Aligned;
3232
33+ static constexpr bool ConcurrencySafe = ParentRange::ConcurrencySafe;
34+
3335 capptr::Chunk<void > alloc_range (size_t size)
3436 {
3537 auto base = state->alloc_range (size);
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ namespace snmalloc
2424
2525 static constexpr bool Aligned = pal_supports<AlignedAllocation, PAL>;
2626
27+ static constexpr bool ConcurrencySafe = true ;
28+
2729 constexpr PalRange () = default;
2830
2931 capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -175,6 +175,8 @@ namespace snmalloc
175175 static constexpr bool Aligned = true ;
176176 static_assert (ParentRange::Aligned, " ParentRange must be aligned" );
177177
178+ static constexpr bool ConcurrencySafe = false ;
179+
178180 constexpr SmallBuddyRange () = default;
179181
180182 capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ namespace snmalloc
3131
3232 static constexpr bool Aligned = ParentRange::Aligned;
3333
34+ static constexpr bool ConcurrencySafe = ParentRange::ConcurrencySafe;
35+
3436 constexpr StatsRange () = default;
3537
3638 capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ namespace snmalloc
3131
3232 static constexpr bool Aligned = ParentRange::Aligned;
3333
34+ static constexpr bool ConcurrencySafe = ParentRange::ConcurrencySafe;
35+
3436 capptr::Chunk<void > alloc_range (size_t sub_size)
3537 {
3638 SNMALLOC_ASSERT (bits::is_pow2 (sub_size));
You can’t perform that action at this time.
0 commit comments