1 #pragma once 2 3 #include "dataspace_interface.h" 4 #include "flexpage.h" 5 #include "memory.h" 6 #include "resource.h" 7 8 9 10 /* A simple pager exposing a single memory region as a dataspace. */ 11 12 class SimplePager : public Dataspace, public Resource 13 { 14 protected: 15 Memory *_memory; 16 Region *_region; 17 18 public: 19 explicit SimplePager(Memory *memory=NULL); 20 21 void close(); 22 23 /* Paging methods. */ 24 25 long map(offset_t offset, l4_addr_t hot_spot, flags_t flags, l4_snd_fpage_t *region); 26 27 long info(offset_t *size, flags_t *flags); 28 }; 29 30 // vim: tabstop=4 expandtab shiftwidth=4