Add partial unmap support (#322)

* Add partial unmap support

* undo accidental whitespace removal

* Fix assertions

* Adjust Reserve and Free functions for partial unmapping
This commit is contained in:
Borchev 2024-08-12 23:05:30 -07:00 committed by GitHub
parent a8b6a55559
commit 18f1799280
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 47 additions and 20 deletions

View file

@ -84,6 +84,7 @@ struct VirtualMemoryArea {
bool disallow_merge = false;
std::string name = "";
uintptr_t fd = 0;
bool is_exec = false;
bool Contains(VAddr addr, size_t size) const {
return addr >= base && (addr + size) <= (base + this->size);
@ -205,7 +206,7 @@ private:
VMAHandle CarveVMA(VAddr virtual_addr, size_t size);
DirectMemoryArea& CarveDmemArea(PAddr addr, size_t size);
DMemHandle CarveDmemArea(PAddr addr, size_t size);
VMAHandle Split(VMAHandle vma_handle, size_t offset_in_vma);