---
title: contents()
framework: metal
role: symbol
role_heading: Instance Method
path: metal/mtlbuffer/contents()
---

# contents()

Gets the system address of the buffer’s storage allocation.

## Declaration

```swift
func contents() -> UnsafeMutableRawPointer
```

## Return Value

Return Value A pointer to the shared copy of the buffer data, or NULL for buffers allocated with a private resource storage mode (MTLStorageMode.private).

## Discussion

Discussion Private resources aren’t CPU-accessible.
