---
title: "guestMemoryMapping(atPhysicalAddress:length:)"
framework: virtualization
role: symbol
role_heading: Instance Method
path: "virtualization/vzcustomvirtiodevice/guestmemorymapping(atphysicaladdress:length:)"
---

# guestMemoryMapping(atPhysicalAddress:length:)

Returns guest memory mapping referred to by physicalAddress and length.

## Declaration

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

## Parameters

- `physicalAddress`: The guest physical address of the memory.
- `length`: Length of the memory.

## Return Value

Return Value A 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.
