Created
October 2, 2015 13:42
-
-
Save toshi0383/1d13a89c3bb36dae9c14 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// A pointer to an object of type `Memory`. This type provides no automated | |
| /// memory management, and therefore the user must take care to allocate | |
| /// and free memory appropriately. | |
| /// | |
| /// The pointer should be aligned to `alignof(Memory.self)`. | |
| /// | |
| /// The pointer can be in one of the following states: | |
| /// | |
| /// - memory is not allocated (for example, pointer is null, or memory has | |
| /// been deallocated previously); | |
| /// | |
| /// - memory is allocated, but value has not been initialized; | |
| /// | |
| /// - memory is allocated and value is initialized. | |
| public struct UnsafeMutablePointer<Memory> : Equatable, Hashable, NilLiteralConvertible, _PointerType, BidirectionalIndexType, ForwardIndexType, _Incrementable, RandomAccessIndexType, Strideable, Comparable, _Strideable, _RandomAccessAmbiguity { | |
| ~~~中略~~~ | |
| /// Allocate memory for `num` objects of type `Memory`. | |
| /// | |
| /// - Postcondition: The memory is allocated, but not initialized. | |
| @warn_unused_result | |
| public static func alloc(num: Int) -> UnsafeMutablePointer<Memory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment