15 #include "vertexDataBook.h"
16 #include "mutexHolder.h"
24 VertexDataBook(
size_t block_size) {
50 Pages::const_iterator pi;
51 for (pi = _pages.begin(); pi != _pages.end(); ++pi) {
52 total += (*pi)->get_max_size();
69 Pages::const_iterator pi;
70 for (pi = _pages.begin(); pi != _pages.end(); ++pi) {
71 if ((*pi)->get_ram_class() == ram_class) {
72 total += (*pi)->get_max_size();
89 Pages::const_iterator pi;
90 for (pi = _pages.begin(); pi != _pages.end(); ++pi) {
91 total += (*pi)->get_total_size();
108 Pages::const_iterator pi;
109 for (pi = _pages.begin(); pi != _pages.end(); ++pi) {
110 if ((*pi)->get_ram_class() == ram_class) {
111 total += (*pi)->get_total_size();
130 for (pi = _pages.begin(); pi != _pages.end(); ++pi) {
131 (*pi)->save_to_disk();
145 do_alloc(
size_t size) {
152 Pages::iterator pi = _pages.lower_bound(&size_page);
157 while (pi != _pages.end()) {
158 Pages::iterator pnext = pi;
A block of bytes that holds one or more VertexDataBlocks.
size_t count_total_page_size() const
Returns the total size of all bytes owned by all pages owned by this book.
size_t count_allocated_size() const
Returns the total size of all bytes allocated within pages owned by this book.
A lightweight C++ object whose constructor calls acquire() and whose destructor calls release() on a ...
void save_to_disk()
Writes all pages to disk immediately, just in case they get evicted later.
A block of bytes that stores the actual raw vertex data referenced by a GeomVertexArrayData object...
size_t round_up_to_page_size(size_t size) const
Rounds the indicated size request up to the next larger multiple of page_size, to qualify it for a ca...