2021-03-27 | Paul Boddie | file changeset files shortlog | Introduced a preallocated memory object alongside the existing incremental allocation object (which has been renamed), both employing a common interface, thus permitting the use of a generic page collection with different page queue types to support both files and pipes. Changed the pipe paging to employ just two pipe regions in order to limit the amount of memory that would be used by each pipe. |
paul@1 | 1 | #pragma once |
paul@1 | 2 | |
paul@1 | 3 | #include "region.h" |
paul@1 | 4 | |
paul@1 | 5 | |
paul@1 | 6 | |
paul@72 | 7 | /* A memory pool interface. */ |
paul@1 | 8 | |
paul@1 | 9 | class Memory |
paul@1 | 10 | { |
paul@72 | 11 | public: |
paul@72 | 12 | virtual ~Memory() |
paul@72 | 13 | { |
paul@72 | 14 | } |
paul@63 | 15 | |
paul@72 | 16 | virtual Region *region() = 0; |
paul@1 | 17 | |
paul@72 | 18 | virtual offset_t region_size() = 0; |
paul@14 | 19 | |
paul@72 | 20 | virtual void release(Region *region) = 0; |
paul@1 | 21 | }; |
paul@1 | 22 | |
paul@1 | 23 | // vim: tabstop=4 expandtab shiftwidth=4 |