#pragma once #if !defined(VK_CAPTURE_DATA_POOL_HPP_INCLUDED) #define VK_CAPTURE_DATA_POOL_HPP_INCLUDED 1 #include #include #include #include #include namespace vk_capture { // // public defines // // // public constants // // // public types // struct DataPool { static constexpr std::size_t PAGE_SIZE = 4096 * 1024; static_assert(PAGE_SIZE % alignof(std::max_align_t) == 0); struct alignas(std::max_align_t) Page : std::array {}; using page_ptr_t = std::unique_ptr; std::vector pages; std::size_t offset = 0; void* allocate(std::size_t bytes, std::size_t alignment = 1); inline void reset() { offset = 0; } }; // // public functions // } // namespace vk_capture #endif // !defined(VK_CAPTURE_DATA_POOL_HPP_INCLUDED)