<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLResidencySet/addAllocations(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So15MTLResidencySetP5MetalE14addAllocationsyySaySo13MTLAllocation_pGF"
  },
  "title" : "addAllocations(_:)"
}
-->

# addAllocations(_:)

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

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

## Parameters

`allocations`

An array of resource allocations, whose elements can be an arbitrarily mix of [`MTLBuffer`](/documentation/Metal/MTLBuffer), [`MTLTexture`](/documentation/Metal/MTLTexture), and [`MTLHeap`](/documentation/Metal/MTLHeap) instances.

## Discussion

Finalize the inclusion of these resource allocations, and all other changes you stage, by calling a residency set’s [`commit()`](/documentation/Metal/MTLResidencySet/commit()) method.

---

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)