<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/CVMutablePixelBuffer/Pool/AllocationAttributes",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "s:9CoreVideo20CVMutablePixelBufferV4PoolC20AllocationAttributesV"
  },
  "title" : "CVMutablePixelBuffer.Pool.AllocationAttributes"
}
-->

# CVMutablePixelBuffer.Pool.AllocationAttributes

Controls how new pixel buffers are allocated when `CVMutablePixelBuffer/Pool/mutablePixelBuffer(with:)` is called.

```
struct AllocationAttributes
```

## Topics

### Initializers

[`init(allocationThreshold: Int?)`](/documentation/CoreVideo/CVMutablePixelBuffer/Pool/AllocationAttributes/init(allocationThreshold:))

### Instance Properties

[`var allocationThreshold: Int?`](/documentation/CoreVideo/CVMutablePixelBuffer/Pool/AllocationAttributes/allocationThreshold)

A new pixel buffer will not be allocated if the pool already has this many or more pixel buffers allocated. This
does not prevent already-allocated buffers from being recycled. If this causes allocation failure, then
`CVMutablePixelBuffer/Pool/mutablePixelBuffer(allocationThreshold:)` throws
[`wouldExceedAllocationThreshold`](/documentation/CoreVideo/CVError/wouldExceedAllocationThreshold).

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)