VertexDataBook
-
class VertexDataBook
A collection of
VertexDataPages
, which can be used to allocate newVertexDataBlock
objects.Inheritance diagram
-
explicit VertexDataBook(std::size_t block_size)
-
VertexDataBlock *alloc(std::size_t size)
Allocates and returns a new VertexDataBuffer of the requested size.
-
std::size_t count_allocated_size(void) const
-
std::size_t count_allocated_size(VertexDataPage::RamClass ram_class) const
Returns the total size of all bytes allocated within pages owned by this book.
Returns the total size of all bytes allocated within pages owned by this book that have the indicated ram class.
-
std::size_t count_total_page_size(void) const
-
std::size_t count_total_page_size(VertexDataPage::RamClass ram_class) const
Returns the total size of all bytes owned by all pages owned by this book.
Returns the total size of all bytes owned by all pages owned by this book that have the indicated ram class.
-
std::size_t get_num_pages(void) const
Returns the number of pages created for the book.
-
void save_to_disk(void)
Writes all pages to disk immediately, just in case they get evicted later. It makes sense to make this call just before taking down a loading screen, to minimize chugs from saving pages inadvertently later.
-
explicit VertexDataBook(std::size_t block_size)