<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Virtualization",
  "identifier" : "/documentation/Virtualization/VZCustomVirtioDevice/guestMemoryMapping(atPhysicalAddress:length:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Virtualization"
    ],
    "preciseIdentifier" : "c:objc(cs)VZCustomVirtioDevice(im)guestMemoryMappingAtPhysicalAddress:length:"
  },
  "title" : "guestMemoryMapping(atPhysicalAddress:length:)"
}
-->

# guestMemoryMapping(atPhysicalAddress:length:)

Returns guest memory mapping referred to by physicalAddress and length.

```
func guestMemoryMapping(atPhysicalAddress physicalAddress: UInt64, length: Int) -> VZGuestMemoryMapping?
```

## Parameters

`physicalAddress`

The guest physical address of the memory.

`length`

Length of the memory.

## Return Value

A [`VZGuestMemoryMapping`](/documentation/Virtualization/VZGuestMemoryMapping) object that contains the guest memory in the host address space, or `nil` if `physicalAddress` and `length` do not reference a valid guest RAM region.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)