<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GSS",
  "identifier" : "/documentation/GSS/gss_create_empty_buffer_set(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "GSS"
    ],
    "preciseIdentifier" : "c:@F@gss_create_empty_buffer_set"
  },
  "title" : "gss_create_empty_buffer_set(_:_:)"
}
-->

# gss_create_empty_buffer_set(_:_:)

Allocates an empty buffer set descriptor that you use to manage an array of buffers.

```
func gss_create_empty_buffer_set(_ minor_status: UnsafeMutablePointer<OM_uint32>, _ buffer_set: UnsafeMutablePointer<gss_buffer_set_t?>) -> OM_uint32
```

## Parameters

`minor_status`

A pointer to the secondary status result that provides additional information in case of failure. Typically, a failure results from an inability to allocate memory which is communicated by the minor status <doc://com.apple.documentation/documentation/Foundation/POSIXError/ENOMEM>.

`buffer_set`

A pointer to a buffer set descriptor reference. When the function successfully allocates a buffer set descriptor, it sets the reference to point at it. The descriptor itself is initialized with zero length and a `NULL` pointer.

    On failure, the reference is unchanged.

## Return Value

A status code set to [`GSS_S_COMPLETE`](/documentation/GSS/GSS_S_COMPLETE) on success, or [`GSS_S_FAILURE`](/documentation/GSS/GSS_S_FAILURE) otherwise. Inspect the `minor_status` parameter for additional information on failure.

## Discussion

This function allocates memory for the data structure that you use to manage an array of buffers, consisting of a length parameter and a pointer. It does not allocate memory for any actual buffers.

When you’re done with the buffer set descriptor created by this function, call [`gss_release_buffer_set(_:_:)`](/documentation/GSS/gss_release_buffer_set(_:_:)) to free its memory, as well as that of any buffers it contains at that time.

---

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)