mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
Kernel: Add RegionTree::find_region_containing(address or range)
Let's encapsulate looking up regions so clients don't have to dig into RegionTree internals.
This commit is contained in:
parent
da7ea2556e
commit
cfb61cbd54
4 changed files with 25 additions and 15 deletions
|
@ -54,6 +54,9 @@ public:
|
|||
|
||||
bool remove(Region&);
|
||||
|
||||
Region* find_region_containing(VirtualAddress);
|
||||
Region* find_region_containing(VirtualRange);
|
||||
|
||||
private:
|
||||
ErrorOr<VirtualRange> allocate_range_anywhere(size_t size, size_t alignment = PAGE_SIZE);
|
||||
ErrorOr<VirtualRange> allocate_range_specific(VirtualAddress base, size_t size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue