---
title: "allocate(bytes:alignedTo:)"
framework: swift
role: symbol
role_heading: Type Method
path: "swift/unsafemutablerawpointer/allocate(bytes:alignedto:)"
---

# allocate(bytes:alignedTo:)

## Declaration

```swift
static func allocate(bytes size: Int, alignedTo alignment: Int) -> UnsafeMutableRawPointer
```
