33 template<
size_t nSize = 32,
size_t nStringStartCapacity = 128>
36 static constexpr
size_t k_nTotalBits = 64;
37 static constexpr
size_t k_nBlocks = (nSize + k_nTotalBits - 1) / k_nTotalBits;
40 static constexpr
int nFreeString = -1;
45 int nIndex = nFreeString;
71 static int ctz64(
u64 nBit) noexcept;
77 static void normalize(
string&
string);
80 std::array<string, nSize> m_Storage;
83 std::array<std::atomic<u64>, k_nBlocks> m_FreeMask;
Fixed-size atomic string pool.
item acquire()
Acquire a string from the pool.
void release(item item)
Return a string back to the pool.