21 VertexDataBook(
size_t block_size) {
42 Pages::const_iterator pi;
43 for (pi = _pages.begin(); pi != _pages.end(); ++pi) {
44 total += (*pi)->get_max_size();
58 Pages::const_iterator pi;
59 for (pi = _pages.begin(); pi != _pages.end(); ++pi) {
60 if ((*pi)->get_ram_class() == ram_class) {
61 total += (*pi)->get_max_size();
76 Pages::const_iterator pi;
77 for (pi = _pages.begin(); pi != _pages.end(); ++pi) {
78 total += (*pi)->get_total_size();
92 Pages::const_iterator pi;
93 for (pi = _pages.begin(); pi != _pages.end(); ++pi) {
94 if ((*pi)->get_ram_class() == ram_class) {
95 total += (*pi)->get_total_size();
111 for (pi = _pages.begin(); pi != _pages.end(); ++pi) {
112 (*pi)->save_to_disk();
123 do_alloc(
size_t size) {
129 Pages::iterator pi = _pages.lower_bound(&size_page);
133 while (pi != _pages.end()) {
134 Pages::iterator pnext = pi;
144 if (block !=
nullptr) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A block of bytes that holds one or more VertexDataBlocks.
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 count_total_page_size() const
Returns the total size of all bytes owned by all pages owned by this book.
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.