---
title: MTLAllocation
framework: metal
role: symbol
role_heading: Protocol
path: metal/mtlallocation
---

# MTLAllocation

A memory allocation from a Metal GPU device, such as a memory heap, texture, or data buffer.

## Declaration

```swift
protocol MTLAllocation : NSObjectProtocol
```

## Mentioned in

Simplifying GPU resource management with residency sets

## Overview

Overview Types that conform to MTLAllocation, including MTLBuffer, MTLTexture, and MTLHeap, have underlying memory. You make their memory resident, or GPU-accessible, by adding an allocation to an MTLResidencySet or calling the appropriate method of a command encoder. See Simplifying GPU resource management with residency sets for more information.

## Topics

### Inspecting an allocation

- [allocatedSize](metal/mtlallocation/allocatedsize.md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

### Inherited By

- [MTL4MachineLearningPipelineState](metal/mtl4machinelearningpipelinestate.md)
- [MTLAccelerationStructure](metal/mtlaccelerationstructure.md)
- [MTLBuffer](metal/mtlbuffer.md)
- [MTLComputePipelineState](metal/mtlcomputepipelinestate.md)
- [MTLHeap](metal/mtlheap.md)
- [MTLIndirectCommandBuffer](metal/mtlindirectcommandbuffer.md)
- [MTLIntersectionFunctionTable](metal/mtlintersectionfunctiontable.md)
- [MTLRenderPipelineState](metal/mtlrenderpipelinestate.md)
- [MTLResource](metal/mtlresource.md)
- [MTLTensor](metal/mtltensor.md)
- [MTLTexture](metal/mtltexture.md)
- [MTLVisibleFunctionTable](metal/mtlvisiblefunctiontable.md)

## See Also

### Common resource functionality

- [MTLGPUAddress](metal/mtlgpuaddress.md)
- [MTLResource](metal/mtlresource.md)
- [MTLResourceOptions](metal/mtlresourceoptions.md)
- [MTLResourceUsage](metal/mtlresourceusage.md)
- [MTLResourceID](metal/mtlresourceid.md)
