<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ParavirtualizedGraphics",
  "identifier" : "/documentation/ParavirtualizedGraphics/PGMapMemory",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Paravirtualized Graphics"
    ],
    "preciseIdentifier" : "c:@T@PGMapMemory"
  },
  "title" : "PGMapMemory"
}
-->

# PGMapMemory

The block signature for a routine that maps guest physical memory into a task.

```
typedef _Bool (^)(struct PGTask_s *, unsigned int, unsigned long long, _Bool, struct PGPhysicalMemoryRange_s *) PGMapMemory;
```

## Parameters

`task`

The task to map the memory into.

`rangeCount  `

The number of ranges to map.

`virtualOffset   `

The offset from the task’s base address where mapping starts.

`readOnly  `

A Boolean value that indicates whether the block maps memory for read access only.

`ranges  `

The set of ranges to map.

## Return Value

Returns <doc://com.apple.documentation/documentation/Swift/true> if the block successfully mapped memory; otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

---

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)