paul@65 | 1 | #pragma once |
paul@65 | 2 | |
paul@65 | 3 | #include "pages.h" |
paul@65 | 4 | |
paul@65 | 5 | |
paul@65 | 6 | |
paul@65 | 7 | /* A page collection where the pages are "conserved", meaning that they are not |
paul@65 | 8 | queued for reuse unless they are completely unused. */ |
paul@65 | 9 | |
paul@65 | 10 | class PagesConserving : public Pages |
paul@65 | 11 | { |
paul@65 | 12 | public: |
paul@66 | 13 | explicit PagesConserving(Memory *memory); |
paul@65 | 14 | |
paul@65 | 15 | explicit PagesConserving(); |
paul@65 | 16 | |
paul@65 | 17 | /* Specialised methods. */ |
paul@65 | 18 | |
paul@65 | 19 | virtual Flexpage *flexpage(); |
paul@65 | 20 | |
paul@65 | 21 | virtual void queue(PageOwner *owner, Flexpage *flexpage); |
paul@65 | 22 | |
paul@65 | 23 | virtual bool reserve(PageOwner *owner, Flexpage *flexpage); |
paul@65 | 24 | |
paul@65 | 25 | /* Memory control methods. */ |
paul@65 | 26 | |
paul@66 | 27 | virtual bool decrease(offset_t size); |
paul@65 | 28 | |
paul@66 | 29 | virtual bool increase(offset_t size); |
paul@65 | 30 | }; |
paul@65 | 31 | |
paul@65 | 32 | // vim: tabstop=4 expandtab shiftwidth=4 |