32 allocId = backingAllocLock_.fetch_or(1, std::memory_order_acquire);
36 if (chunks_.empty()) {
38 if (backingAllocs2_.empty()) {
39 buffer =
reinterpret_cast<char*
>(allocFunc_(allocSize_));
41 buffer = backingAllocs2_.back();
42 backingAllocs2_.pop_back();
44 backingAllocs_.push_back(
buffer);
46 for (
size_t i = 0;
i < chunksPerAlloc_ - 1; ++
i) {
51 backingAllocLock_.store(0, std::memory_order_release);
55 char* back = chunks_.back();
58 backingAllocLock_.store(0, std::memory_order_release);
62 std::this_thread::yield();