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