---
title: "init(start:count:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/unsafebufferpointer/init(start:count:)"
---

# init(start:count:)

Creates a new buffer pointer over the specified number of contiguous instances beginning at the given pointer.

## Declaration

```swift
init(start: UnsafePointer<Element>?, count: Int)
```

## Parameters

- `start`: A pointer to the start of the buffer, or nil. If start is nil, count must be zero. However, count may be zero even for a non-nil start. The pointer passed as start must be aligned to MemoryLayout<Element>.alignment.
- `count`: The number of instances in the buffer. count must not be negative.
