---
title: MTLHeapDescriptor
framework: metal
role: symbol
role_heading: Class
path: metal/mtlheapdescriptor
---

# MTLHeapDescriptor

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

## Declaration

```swift
class MTLHeapDescriptor
```

## Mentioned in

Creating sparse heaps and sparse textures Understanding the Metal 4 core API

## Overview

Overview Create an MTLHeap by configuring an MTLHeapDescriptor instance’s properties and passing it to the makeHeap(descriptor:) method of an 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](metal/mtlheapdescriptor/type.md)
- [storageMode](metal/mtlheapdescriptor/storagemode.md)
- [cpuCacheMode](metal/mtlheapdescriptor/cpucachemode.md)
- [hazardTrackingMode](metal/mtlheapdescriptor/hazardtrackingmode.md)
- [resourceOptions](metal/mtlheapdescriptor/resourceoptions.md)
- [size](metal/mtlheapdescriptor/size.md)
- [sparsePageSize](metal/mtlheapdescriptor/sparsepagesize.md)

### Instance Properties

- [maxCompatiblePlacementSparsePageSize](metal/mtlheapdescriptor/maxcompatibleplacementsparsepagesize.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)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Resource memory allocation and management

- [Using argument buffers with resource heaps](metal/using-argument-buffers-with-resource-heaps.md)
- [Implementing a multistage image filter using heaps and events](metal/implementing-a-multistage-image-filter-using-heaps-and-events.md)
- [Implementing a multistage image filter using heaps and fences](metal/implementing-a-multistage-image-filter-using-heaps-and-fences.md)
- [MTLHeap](metal/mtlheap.md)
- [MTLHeapType](metal/mtlheaptype.md)
- [MTLSizeAndAlign](metal/mtlsizeandalign.md)
