Improved ThreadAlloc::get API
Made the API so that get always returns an initialised Alloc*. Added new fast path that doesn't perform checking, but can lead to very slow behaviour if called and reused.
This commit is contained in:
@@ -7,7 +7,7 @@ using namespace snmalloc;
|
||||
template<ZeroMem zero_mem>
|
||||
void test_alloc_dealloc(size_t count, size_t size, bool write)
|
||||
{
|
||||
auto*& alloc = ThreadAlloc::get();
|
||||
auto* alloc = ThreadAlloc::get();
|
||||
|
||||
DO_TIME(
|
||||
"Count: " << std::setw(6) << count << ", Size: " << std::setw(6) << size
|
||||
|
||||
Reference in New Issue
Block a user