mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-04 00:49:45 +08:00
Fix Linux aligned mapping retention
This commit is contained in:
@@ -349,10 +349,8 @@ public sealed unsafe class PhysicalVirtualMemory : IVirtualMemory, IGuestMemoryA
|
|||||||
var requestedCursor = AlignUp(desiredAddress, effectiveAlignment);
|
var requestedCursor = AlignUp(desiredAddress, effectiveAlignment);
|
||||||
var cursor = GetAllocationSearchCursor(desiredAddress, requestedCursor, effectiveAlignment, executable);
|
var cursor = GetAllocationSearchCursor(desiredAddress, requestedCursor, effectiveAlignment, executable);
|
||||||
|
|
||||||
// POSIX treats the requested address as a hint, and Rosetta may
|
// macOS needs alignment over-allocation; Linux uses exact-address search.
|
||||||
// relocate whole guest windows. Over-allocate once so the returned
|
if (OperatingSystem.IsMacOS())
|
||||||
// host range always contains an aligned guest-visible start.
|
|
||||||
if (!OperatingSystem.IsWindows())
|
|
||||||
{
|
{
|
||||||
var reserveSize = effectiveAlignment > PageSize
|
var reserveSize = effectiveAlignment > PageSize
|
||||||
? alignedSize + effectiveAlignment
|
? alignedSize + effectiveAlignment
|
||||||
|
|||||||
Reference in New Issue
Block a user