Workaround for readonly memory mapping of files issue

This commit is contained in:
Borchev 2024-08-20 16:10:38 -07:00
parent 32cb3649d3
commit 6596fe091c
4 changed files with 26 additions and 12 deletions

View file

@ -242,10 +242,11 @@ void MemoryManager::UnmapMemory(VAddr virtual_addr, size_t size) {
vma.disallow_merge = false;
vma.name = "";
MergeAdjacent(vma_map, new_it);
bool readonly = vma.prot == MemoryProt::CpuRead;
// Unmap the memory region.
impl.Unmap(vma_base_addr, vma_base_size, start_in_vma, start_in_vma + size, phys_base, is_exec,
has_backing);
has_backing, readonly);
TRACK_FREE(virtual_addr, "VMEM");
}