6#ifndef INKSCAPE_UTIL_POOL_H
7#define INKSCAPE_UTIL_POOL_H
39 std::byte *
allocate(std::size_t
size, std::size_t alignment);
A Pool is a block allocator with the following characteristics:
Pool(Pool const &)=delete
T * allocate()
Convenience function: allocate a block of size and aligment for T.
Pool & operator=(Pool const &)=delete
std::vector< std::unique_ptr< std::byte[]> > buffers
void movefrom(Pool &other) noexcept
void resetblock() noexcept
void free_all() noexcept
Free all previous allocations, retaining the largest existing buffer for re-use.
Pool(Pool &&other) noexcept
Pool & operator=(Pool &&other) noexcept
void reserve(std::size_t size)
Ensure that the next buffer requested has at least the specified size.
Miscellaneous supporting code.