<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/kCVPixelBufferPoolAllocationThresholdKey",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "c:@kCVPixelBufferPoolAllocationThresholdKey"
  },
  "title" : "kCVPixelBufferPoolAllocationThresholdKey"
}
-->

# kCVPixelBufferPoolAllocationThresholdKey

The key you use to set the auxiliary attributes dictionary.

```
let kCVPixelBufferPoolAllocationThresholdKey: CFString
```

## Discussion

Use this key to set `auxAttributes` in [`CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:)`](/documentation/CoreVideo/CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:)).

The value for this key specifies that the system shouldn’t allocate a new pixel buffer if the pool already holds at least the specified number of allocated pixel buffers. This key doesn’t prevent the system from recycling allocated buffers. If this key causes [`CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:)`](/documentation/CoreVideo/CVPixelBufferPoolCreatePixelBufferWithAuxAttributes(_:_:_:_:)) to fail, it returns the [`kCVReturnWouldExceedAllocationThreshold`](/documentation/CoreVideo/kCVReturnWouldExceedAllocationThreshold) result code.

---

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)