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

# PGCreateTask

The block signature for a routine that creates a task.

```
typedef struct PGTask_s *(^)(unsigned long long, void **) PGCreateTask;
```

## Parameters

`vmSize`

The size of the virtual memory reservation to make for this task.

`baseAddress`

On return, the block writes the base-host virtually contiguous address for this task.

## Return Value

A [`PGTask_t`](/documentation/ParavirtualizedGraphics/PGTask_t) pointer, or `NULL` if an error occurred.

## Discussion

The paravirtualization framework calls this block to request memory for a task. The block allocates virtual memory for the task and returns it to the framework. The block also records any data it needs to keep track of this task and returns a pointer to that data. The framework uses this pointer to identify the task in other operations. The framework never accesses the contents of the [`PGTask_t`](/documentation/ParavirtualizedGraphics/PGTask_t) pointer.

---

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)