Fix Linux aligned mapping retention
This commit is contained in:
parent
94463576f8
commit
25ea376d41
|
|
@ -349,10 +349,8 @@ public sealed unsafe class PhysicalVirtualMemory : IVirtualMemory, IGuestMemoryA
|
|||
var requestedCursor = AlignUp(desiredAddress, effectiveAlignment);
|
||||
var cursor = GetAllocationSearchCursor(desiredAddress, requestedCursor, effectiveAlignment, executable);
|
||||
|
||||
// POSIX treats the requested address as a hint, and Rosetta may
|
||||
// relocate whole guest windows. Over-allocate once so the returned
|
||||
// host range always contains an aligned guest-visible start.
|
||||
if (!OperatingSystem.IsWindows())
|
||||
// macOS needs alignment over-allocation; Linux uses exact-address search.
|
||||
if (OperatingSystem.IsMacOS())
|
||||
{
|
||||
var reserveSize = effectiveAlignment > PageSize
|
||||
? alignedSize + effectiveAlignment
|
||||
|
|
|
|||
Loading…
Reference in New Issue