Add ConcurrencySafe property
Ranges can be safe to call from multiple threads. This adds a constexpr field to signify if that is the case.
This commit is contained in:
committed by
Matthew Parkinson
parent
bdb3183989
commit
e77b9e2851
@@ -235,6 +235,9 @@ namespace snmalloc
|
||||
}
|
||||
else
|
||||
{
|
||||
static_assert(
|
||||
GlobalMetaRange::ConcurrencySafe,
|
||||
"Global meta data range needs to be concurrency safe.");
|
||||
typename GlobalMetaRange::State global_state;
|
||||
p = global_state->alloc_range(bits::next_pow2(size));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user