Type Method

allocate(byteCount:alignment:)

Returns a newly allocated buffer with the given size, in bytes.

Declaration

static func allocate(byteCount: Int, alignment: Int) -> UnsafeMutableRawBufferPointer

Parameters

byteCount

The number of bytes to allocate.

alignment

The alignment of the new region of allocated memory, in bytes.

Return Value

A buffer pointer to a newly allocated region of memory aligned to alignment.

Discussion

The memory referenced by the new buffer is allocated, but not initialized.