2021-03-27 | Paul Boddie | file changeset files shortlog | Added comment. |
paul@6 | 1 | #pragma once |
paul@6 | 2 | |
paul@6 | 3 | #include "flexpage.h" |
paul@6 | 4 | #include "memory.h" |
paul@6 | 5 | #include "page_owner.h" |
paul@6 | 6 | #include "page_queue.h" |
paul@6 | 7 | |
paul@6 | 8 | |
paul@6 | 9 | |
paul@6 | 10 | /* A page collection. */ |
paul@6 | 11 | |
paul@6 | 12 | class Pages |
paul@6 | 13 | { |
paul@6 | 14 | protected: |
paul@6 | 15 | PageQueue _queue; |
paul@6 | 16 | Memory *_memory; |
paul@6 | 17 | |
paul@6 | 18 | public: |
paul@6 | 19 | explicit Pages(Memory *memory); |
paul@6 | 20 | |
paul@6 | 21 | explicit Pages(); |
paul@6 | 22 | |
paul@65 | 23 | virtual Flexpage *remove(); |
paul@6 | 24 | |
paul@65 | 25 | virtual bool reserve(PageOwner *owner, Flexpage *flexpage); |
paul@6 | 26 | |
paul@65 | 27 | virtual Flexpage *flexpage(); |
paul@6 | 28 | |
paul@65 | 29 | virtual void queue(PageOwner *owner, Flexpage *flexpage); |
paul@6 | 30 | |
paul@65 | 31 | virtual void release(Flexpage *flexpage); |
paul@6 | 32 | }; |
paul@6 | 33 | |
paul@6 | 34 | // vim: tabstop=4 expandtab shiftwidth=4 |