<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLHeapDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLHeapDescriptor"
  },
  "title" : "MTLHeapDescriptor"
}
-->

# MTLHeapDescriptor

A configuration that customizes the behavior for a Metal memory heap.

```
class MTLHeapDescriptor
```

## Overview

Create an [`MTLHeap`](/documentation/Metal/MTLHeap) by configuring an [`MTLHeapDescriptor`](/documentation/Metal/MTLHeapDescriptor) instance’s properties and passing it to the [`makeHeap(descriptor:)`](/documentation/Metal/MTLDevice/makeHeap(descriptor:)) method of an [`MTLDevice`](/documentation/Metal/MTLDevice).

Each new heap inherits the descriptor’s configuration as you create it, which means you can modify and reuse a descriptor to create other heaps.

## Topics

### Configuring a heap

[`type`](/documentation/Metal/MTLHeapDescriptor/type)

The memory placement strategy for any resources you allocate from the heaps you create with this descriptor.

[`storageMode`](/documentation/Metal/MTLHeapDescriptor/storageMode)

The storage mode for the heaps you create with this descriptor.

[`cpuCacheMode`](/documentation/Metal/MTLHeapDescriptor/cpuCacheMode)

The CPU cache behavior for any resources you allocate from the heaps you create with this descriptor.

[`hazardTrackingMode`](/documentation/Metal/MTLHeapDescriptor/hazardTrackingMode)

The hazard tracking behavior for any resources you allocate from the heaps you create with this descriptor.

[`resourceOptions`](/documentation/Metal/MTLHeapDescriptor/resourceOptions)

The combined behavior for any resources you allocate from the heaps you create with this descriptor.

[`size`](/documentation/Metal/MTLHeapDescriptor/size)

The total amount of memory, in bytes, for the heaps you create with this descriptor.

[`sparsePageSize`](/documentation/Metal/MTLHeapDescriptor/sparsePageSize)

The page size for any resources you allocate from the heaps you create with this descriptor.



---

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)