---
title: "addAllocations(_:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtlresidencyset/addallocations(_:)"
---

# addAllocations(_:)

Stages multiple resources to join the residency set’s list of allocations.

## Declaration

```swift
func addAllocations(_ allocations: [any MTLAllocation])
```

## Parameters

- `allocations`: An array of resource allocations, whose elements can be an arbitrarily mix of doc://com.apple.metal/documentation/Metal/MTLBuffer, doc://com.apple.metal/documentation/Metal/MTLTexture, and doc://com.apple.metal/documentation/Metal/MTLHeap instances.

## Mentioned in

Simplifying GPU resource management with residency sets

## Discussion

Discussion Finalize the inclusion of these resource allocations, and all other changes you stage, by calling a residency set’s commit() method.

## See Also

### Adding allocations

- [addAllocation(_:)](metal/mtlresidencyset/addallocation(_:).md)
