1.1 --- a/libexec/lib/src/pager.cc Mon Mar 06 18:30:22 2023 +0100
1.2 +++ b/libexec/lib/src/pager.cc Mon Mar 06 19:12:48 2023 +0100
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * Common system pager functionality.
1.6 *
1.7 - * Copyright (C) 2022 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -41,6 +41,8 @@
1.13 {
1.14 }
1.15
1.16 +
1.17 +
1.18 /* Add a region to the pager. */
1.19
1.20 void ExecPager::add(MappedRegion ®ion)
1.21 @@ -48,6 +50,15 @@
1.22 _regions[region.start] = region;
1.23 }
1.24
1.25 +/* Remove a region from the pager. */
1.26 +
1.27 +void ExecPager::remove(MappedRegion ®ion)
1.28 +{
1.29 + _regions.erase(region.start);
1.30 +}
1.31 +
1.32 +
1.33 +
1.34 /* Attach a region for provision when page faults occur. */
1.35
1.36 long ExecPager::find(address_t *start, address_t *size, map_flags_t flags,