File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -263,13 +263,19 @@ extension Unsafe${Mutable}RawBufferPointer: RandomAccessCollection { }
263
263
264
264
extension Unsafe ${ Mutable} RawBufferPointer {
265
265
% if mutable:
266
- /// Returns a newly allocated buffer with the given size, in bytes .
266
+ /// Allocates uninitialized memory with the specified size and alignment .
267
267
///
268
- /// The memory referenced by the new buffer is allocated, but not
269
- /// initialized.
268
+ /// You are in charge of managing the allocated memory. Be sure to deallocate
269
+ /// any memory that you manually allocate.
270
+ ///
271
+ /// The allocated memory is not bound to any specific type and must be bound
272
+ /// before performing any typed operations. If you are using the memory for
273
+ /// a specific type, allocate memory using the
274
+ /// `UnsafeMutablePointerBuffer.allocate(capacity:)` static method instead.
270
275
///
271
276
/// - Parameters:
272
- /// - byteCount: The number of bytes to allocate.
277
+ /// - byteCount: The number of bytes to allocate. `byteCount` must not be
278
+ /// negative.
273
279
/// - alignment: The alignment of the new region of allocated memory, in
274
280
/// bytes. `alignment` must be a whole power of 2.
275
281
/// - Returns: A buffer pointer to a newly allocated region of memory aligned
You can’t perform that action at this time.
0 commit comments