1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

Kernel: Stop exposing RegionTree API for VM range allocation

...and remove the last remaining client of the API. It's no longer
possible to ask the RegionTree for a VM range. You can only ask it to
place your Region somewhere in available space.
This commit is contained in:
Andreas Kling 2022-04-03 17:31:58 +02:00
parent 07f3d09c55
commit e89c9ed2ca
2 changed files with 6 additions and 5 deletions

View file

@ -39,13 +39,13 @@ public:
ErrorOr<NonnullOwnPtr<Memory::Region>> create_identity_mapped_region(PhysicalAddress, size_t);
void delete_all_regions_assuming_they_are_unmapped();
private:
ErrorOr<VirtualRange> try_allocate_anywhere(size_t size, size_t alignment = PAGE_SIZE);
ErrorOr<VirtualRange> try_allocate_specific(VirtualAddress base, size_t size);
ErrorOr<VirtualRange> try_allocate_randomized(size_t size, size_t alignment = PAGE_SIZE);
void delete_all_regions_assuming_they_are_unmapped();
private:
Spinlock m_lock;
IntrusiveRedBlackTree<&Region::m_tree_node> m_regions;