Small tweaks to make the sandbox mode happy.

Allow replacing the type of GlobalVirtual at compile time.
Make that type a friend of Pool so that it can allocate things.
This commit is contained in:
David Chisnall
2021-01-13 15:23:56 +00:00
committed by David Chisnall
parent c33f355736
commit db3580a9d8
2 changed files with 13 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ namespace snmalloc
friend Pooled<T>;
template<SNMALLOC_CONCEPT(ConceptPAL) PAL>
friend class MemoryProviderStateMixin;
friend SNMALLOC_DEFAULT_MEMORY_PROVIDER;
std::atomic_flag lock = ATOMIC_FLAG_INIT;
MPMCStack<T, PreZeroed> stack;