File tree 9 files changed +18
-0
lines changed
9 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ namespace snmalloc
25
25
26
26
static constexpr bool Aligned = ParentRange::Aligned;
27
27
28
+ static constexpr bool ConcurrencySafe = ParentRange::ConcurrencySafe;
29
+
28
30
constexpr CommitRange () = default;
29
31
30
32
capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ namespace snmalloc
19
19
20
20
static constexpr bool Aligned = true ;
21
21
22
+ static constexpr bool ConcurrencySafe = true ;
23
+
22
24
constexpr EmptyRange () = default;
23
25
24
26
capptr::Chunk<void > alloc_range (size_t )
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ namespace snmalloc
37
37
38
38
static constexpr bool Aligned = ParentRange::Aligned;
39
39
40
+ static constexpr bool ConcurrencySafe = true ;
41
+
40
42
constexpr GlobalRange () = default;
41
43
42
44
capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -271,6 +271,8 @@ namespace snmalloc
271
271
272
272
static constexpr bool Aligned = true ;
273
273
274
+ static constexpr bool ConcurrencySafe = false ;
275
+
274
276
constexpr LargeBuddyRange () = default;
275
277
276
278
capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ namespace snmalloc
30
30
31
31
static constexpr bool Aligned = ParentRange::Aligned;
32
32
33
+ static constexpr bool ConcurrencySafe = ParentRange::ConcurrencySafe;
34
+
33
35
capptr::Chunk<void > alloc_range (size_t size)
34
36
{
35
37
auto base = state->alloc_range (size);
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ namespace snmalloc
24
24
25
25
static constexpr bool Aligned = pal_supports<AlignedAllocation, PAL>;
26
26
27
+ static constexpr bool ConcurrencySafe = true ;
28
+
27
29
constexpr PalRange () = default;
28
30
29
31
capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -175,6 +175,8 @@ namespace snmalloc
175
175
static constexpr bool Aligned = true ;
176
176
static_assert (ParentRange::Aligned, " ParentRange must be aligned" );
177
177
178
+ static constexpr bool ConcurrencySafe = false ;
179
+
178
180
constexpr SmallBuddyRange () = default;
179
181
180
182
capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ namespace snmalloc
31
31
32
32
static constexpr bool Aligned = ParentRange::Aligned;
33
33
34
+ static constexpr bool ConcurrencySafe = ParentRange::ConcurrencySafe;
35
+
34
36
constexpr StatsRange () = default;
35
37
36
38
capptr::Chunk<void > alloc_range (size_t size)
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ namespace snmalloc
31
31
32
32
static constexpr bool Aligned = ParentRange::Aligned;
33
33
34
+ static constexpr bool ConcurrencySafe = ParentRange::ConcurrencySafe;
35
+
34
36
capptr::Chunk<void > alloc_range (size_t sub_size)
35
37
{
36
38
SNMALLOC_ASSERT (bits::is_pow2 (sub_size));
You can’t perform that action at this time.
0 commit comments