mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
Kernel: Remove allocate_region() functions that don't take a Range
Let's force callers to provide a VM range when allocating a region. This makes ENOMEM error handling more visible and removes implicit VM allocation which felt a bit magical.
This commit is contained in:
parent
d697d33fa6
commit
1e25d2b734
5 changed files with 41 additions and 25 deletions
|
@ -437,8 +437,6 @@ public:
|
|||
return m_euid == 0;
|
||||
}
|
||||
|
||||
KResultOr<Region*> allocate_region_with_vmobject(VirtualAddress, size_t, NonnullRefPtr<VMObject>, size_t offset_in_vmobject, const String& name, int prot, bool shared);
|
||||
KResultOr<Region*> allocate_region(VirtualAddress, size_t, const String& name, int prot = PROT_READ | PROT_WRITE, AllocationStrategy strategy = AllocationStrategy::Reserve);
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue