address_space: Don't reserve space again

This commit is contained in:
raphaelthegreat 2024-06-08 19:10:32 +03:00
parent edaeee194d
commit e9679f8309
2 changed files with 19 additions and 7 deletions

View file

@ -92,10 +92,7 @@ int MemoryManager::MapMemory(void** out_addr, VAddr virtual_addr, size_t size, M
it++;
}
ASSERT(it != vma_map.end());
if (alignment > 0) {
ASSERT_MSG(it->second.base % alignment == 0, "Free region base is not aligned");
}
mapped_addr = it->second.base;
mapped_addr = alignment > 0 ? Common::AlignUp(it->second.base, alignment) : it->second.base;
}
// Perform the mapping.