89 backingResources_(reinterpret_cast<char*>(
90 detail::alignedMallocOrThrow(size * detail::alignToCacheLine(sizeof(T))))),
92 char* buf = backingResources_;
110 for (
size_t i = 0; i < constructed; ++i) {
111 reinterpret_cast<T*
>(backing + i * detail::alignToCacheLine(
sizeof(T)))->~T();
113 detail::alignedFree(backing);
115 } cleanup{backingResources_, 0};
117 while (cleanup.constructed < size) {
118 T* t =
new (buf) T(init());
119 ++cleanup.constructed;
121 buf += detail::alignToCacheLine(
sizeof(T));
123 cleanup.backing =
nullptr;