1.1 --- a/libexec/include/exec/pager.h Tue Mar 14 23:51:57 2023 +0100
1.2 +++ b/libexec/include/exec/pager.h Wed Mar 15 00:33:40 2023 +0100
1.3 @@ -21,15 +21,15 @@
1.4
1.5 #pragma once
1.6
1.7 -#include <map>
1.8 +#include <set>
1.9
1.10 -#include <exec/mapped_region.h>
1.11 +#include <exec/memory_area.h>
1.12
1.13
1.14
1.15 -/* Collection types. */
1.16 +/* Collection definitions. */
1.17
1.18 -typedef std::map<l4_addr_t, MappedRegion> MappedRegions;
1.19 +typedef std::set<l4_cap_idx_t> Capabilities;
1.20
1.21
1.22
1.23 @@ -38,14 +38,19 @@
1.24 class ExecPager
1.25 {
1.26 protected:
1.27 - address_t _start, _end;
1.28 +
1.29 + /* Top-level area containing other areas and regions. */
1.30 +
1.31 + AvailableMemoryArea _area;
1.32 +
1.33 + /* Dataspace capabilities associated with regions. */
1.34 +
1.35 + Capabilities _dataspaces;
1.36
1.37 /* Region manager/mapper functionality. */
1.38
1.39 - MappedRegions _regions;
1.40 -
1.41 virtual long find(address_t *start, address_t *size, map_flags_t flags,
1.42 - address_t offset, unsigned char align);
1.43 + unsigned char align, MemoryArea **area);
1.44
1.45 public:
1.46 explicit ExecPager(address_t start = 0, address_t end = 0);
1.47 @@ -54,9 +59,9 @@
1.48
1.49 /* Region management methods. */
1.50
1.51 - virtual void add(MappedRegion ®ion);
1.52 + virtual void add(MemoryArea &area);
1.53
1.54 - virtual void remove(MappedRegion ®ion);
1.55 + virtual void remove(MemoryArea &area);
1.56
1.57 /* Notification methods. */
1.58