<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IOExtensiblePaniclog/ClaimBuffer",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOExtensiblePaniclog@F@ClaimBuffer#*k#S0_#"
  },
  "title" : "ClaimBuffer"
}
-->

# ClaimBuffer

```
virtual kern_return_t ClaimBuffer(uint64_t *addr, uint64_t *len);
```

## Parameters

`addr`

Address of the mapped buffer

`len`

The length of the mapped buffer. This is same value as the max_len in
the Create() function

## Return Value

0 in case of success. Negative in case of an error.

## Discussion\abstract This function is called to get a pointer to the ext paniclog buffer
\discussion After this function is called, the user is responsible for copying data into the buffer.
The entire buffer is copied when a system panics.
After claiming the buffer, YieldBuffer() has to be called to set the used_len of the buffer
before calling InsertData() or AppendData()

---

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)