---
title: VZGuestMemoryMapping
framework: virtualization
role: symbol
role_heading: Class
path: virtualization/vzguestmemorymapping
---

# VZGuestMemoryMapping

An object that represents a chunk of the guest operating system’s dynamic random access memory (DRAM).

## Declaration

```swift
class VZGuestMemoryMapping
```

## Overview

Overview A VZGuestMemoryMapping object provides read and write access to guest’s DRAM for a VZCustomVirtioDevice for Virtio devices that need to directly interact with the guest’s DRAM. Don’t instantiate aVZGuestMemoryMapping objects directly. Instead, call the guestMemoryMapping(atPhysicalAddress:length:) method and the framework creates a VZGuestMemoryMapping object for you. Throughout its lifetime, a VZGuestMemoryMapping object holds a reference to the all of the host memory allocated for the guest’s DRAM. When the virtual machine is rebooted or shutdown, the allocated host memory becomes invalidated and remapped. As such, an instance of VZGuestMemoryMapping can’t be used across a reboot or shutdown of the virtual machine.

## Topics

### Instance Properties

- [length](virtualization/vzguestmemorymapping/length.md)
- [mutableBytes](virtualization/vzguestmemorymapping/mutablebytes.md)
- [physicalAddress](virtualization/vzguestmemorymapping/physicaladdress.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Related Documentation

- [VZCustomVirtioDevice](virtualization/vzcustomvirtiodevice.md)

### Provisioning options

- [VZMacGuestProvisioningOptions](virtualization/vzmacguestprovisioningoptions.md)
- [VZGuestProvisioningOptions](virtualization/vzguestprovisioningoptions.md)
