summaryrefslogtreecommitdiff
path: root/Kernel/VM/Space.h
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-04-07 02:17:05 +0300
committerAndreas Kling <kling@serenityos.org>2021-04-12 18:03:44 +0200
commit497c759ab773b73a2f66a82ad13901b9178ee49e (patch)
tree392e2d654769289e5aa4b86ac56d234621834aac /Kernel/VM/Space.h
parentf8a3da46fd7617a96300813d45ebef12597e979e (diff)
downloadserenity-497c759ab773b73a2f66a82ad13901b9178ee49e.zip
Kernel: Remove old region from process' regions vector before splitting
This does not affect functionality right now, but it means that the regions vector will now never have any overlapping regions, which will allow the use of balance binary search trees instead of a vector in the future. (since they require keys to be exclusive)
Diffstat (limited to 'Kernel/VM/Space.h')
-rw-r--r--Kernel/VM/Space.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/VM/Space.h b/Kernel/VM/Space.h
index dde64230dc..fd5ae428b1 100644
--- a/Kernel/VM/Space.h
+++ b/Kernel/VM/Space.h
@@ -58,6 +58,7 @@ public:
KResultOr<Region*> allocate_region_with_vmobject(const Range&, NonnullRefPtr<VMObject>, size_t offset_in_vmobject, const String& name, int prot, bool shared);
KResultOr<Region*> allocate_region(const Range&, const String& name, int prot = PROT_READ | PROT_WRITE, AllocationStrategy strategy = AllocationStrategy::Reserve);
bool deallocate_region(Region& region);
+ OwnPtr<Region> take_region(Region& region);
Region& allocate_split_region(const Region& source_region, const Range&, size_t offset_in_vmobject);
Vector<Region*, 2> split_region_around_range(const Region& source_region, const Range&);