mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
Kernel: Support partial munmap()
You can now munmap() a part of a region. The kernel will then create one or two new regions around the "hole" and re-map them using the same physical pages as before. This goes towards fixing #175, but not all the way since we don't yet do munmap() across multiple mappings.
This commit is contained in:
parent
0e53b1d1ad
commit
d720388acf
2 changed files with 62 additions and 16 deletions
|
@ -275,6 +275,8 @@ public:
|
|||
Region* allocate_region(VirtualAddress, size_t, const String& name, int prot = PROT_READ | PROT_WRITE, bool commit = true);
|
||||
bool deallocate_region(Region& region);
|
||||
|
||||
Region& allocate_split_region(const Region& source_region, const Range&);
|
||||
|
||||
void set_being_inspected(bool b) { m_being_inspected = b; }
|
||||
bool is_being_inspected() const { return m_being_inspected; }
|
||||
|
||||
|
@ -348,7 +350,8 @@ private:
|
|||
|
||||
TTY* m_tty { nullptr };
|
||||
|
||||
Region* region_from_range(VirtualAddress, size_t);
|
||||
Region* region_from_range(const Range&);
|
||||
Region* region_containing(const Range&);
|
||||
|
||||
NonnullRefPtrVector<Region> m_regions;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue