-
An empty instance.
Declaration
Swift
public init() -
An incorrect use of memory.
See moreDeclaration
Swift
public enum Error : Swift.Error, Regular -
A position in some allocation.
Declaration
Swift
public typealias Offset = Int -
The bytes of an
Allocationpreceded by zero or more bytes of initial padding for alignment purposes.Declaration
Swift
public typealias Storage = [UInt8] -
A usable region.
See moreDeclaration
Swift
public struct Allocation -
A memory location.
See moreDeclaration
Swift
public struct Address : Regular, CustomStringConvertible -
The live allocations, by ID
Declaration
Swift
public private(set) var allocation: [Allocation.ID : Allocation] { get } -
The ID of the next allocated block.
Declaration
Swift
private var nextAllocation: Int -
Allocates
nbytes with alignmentm.Declaration
Swift
public mutating func allocate(_ n: Int, bytesWithAlignment m: Int) -> Address -
Deallocates the allocated memory starting at
a.Declaration
Swift
public mutating func deallocate(_ a: Address) throws -
Replaces the initialization records starting at
afor the parts of atinstance, with the initialization record for atinstance.Declaration
Swift
public mutating func compose(_ t: TypeLayout, at a: Address) throws -
Returns true if
ais aligned to annbyte boundary.Declaration
Swift
public func address(_ a: Address, hasAlignment n: Int) -> Bool -
Replaces the initialization record for a
tinstance atawith the initialization records for any parts of that instance.Declaration
Swift
public mutating func decompose(_ t: TypeLayout, at a: Address) throws -
Undocumented
Declaration
Swift
private func checkDecomposable(_ t: TypeLayout, at a: Address) throws -> Allocation.ComposedRegions.Index -
The allocation identified by
i.Declaration
Swift
public subscript(i: Allocation.ID) -> Allocation { get set } -
Deallocates the allocated memory at
a, leaving it deallocated and renderingaunusable for any purpose.Declaration
Swift
mutating func deallocate(_ a: ModuleScope.Address) throws
View on GitHub