Fix flag description

This commit is contained in:
Stephen Miller 2025-05-15 13:42:28 -05:00 committed by GitHub
parent fbab952472
commit 8258a4b66f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -376,8 +376,8 @@ int MemoryManager::MapMemory(void** out_addr, VAddr virtual_addr, size_t size, M
// To account for this, unmap any reserved areas within this mapping range first.
auto unmap_addr = mapped_addr;
auto unmap_size = size;
// If flag NoOverwrite is provided, allow overwriting mapped VMAs.
// Otherwise, we can only overwrite unmapped or reserved VMAs.
// If flag NoOverwrite is provided, don't overwrite mapped VMAs.
// When it isn't provided, VMAs can be overwritten regardless of if they're mapped.
auto should_overwrite = False(flags & MemoryMapFlags::NoOverwrite) || !vma.IsMapped();
while (should_overwrite && unmap_addr < mapped_addr + size && remaining_size < size) {
auto unmapped = UnmapBytesFromEntry(unmap_addr, vma, unmap_size);