32 template<
size_t nSize = 32>
35 static constexpr
size_t bTotalBits = 64;
36 static constexpr
size_t nBlocks = (nSize + bTotalBits - 1) / bTotalBits;
37 static constexpr
size_t bStringStartCapacity = 128;
40 static constexpr
int nFreeString = -1;
45 int nIndex = nFreeString;
64 void release(
string sValue,
int nIndex);
72 static int ctz64(
u64 nBit) noexcept;
78 static void normalize(
string&
string);
81 std::array<string, nSize> m_Storage;
84 std::array<std::atomic<u64>, nBlocks> m_FreeMask;
Fixed-size atomic string pool.
item acquire()
Acquire a string from the pool.
void release(string sValue, int nIndex)
Return a string back to the pool.