maxAvailableSize(alignment:)
The maximum size of a resource, in bytes, that can be currently allocated from the heap.
Declaration
func maxAvailableSize(alignment: Int) -> IntParameters
- alignment:
The alignment of the resource, in bytes. This value needs to be a power of two.
Return Value
The maximum size for the resource, in bytes.
Discussion
This method measures fragmentation within the heap. You can use the heapBufferSizeAndAlign(length:options:) and heapTextureSizeAndAlign(descriptor:) methods to help you determine the correct alignment for the resource.