---
title: size
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlheap/size
---

# size

The total size of the heap, in bytes.

## Declaration

```swift
var size: Int { get }
```

## See Also

### Checking a heap’s size information

- [maxAvailableSize(alignment:)](metal/mtlheap/maxavailablesize(alignment:).md)
- [usedSize](metal/mtlheap/usedsize.md)
- [currentAllocatedSize](metal/mtlheap/currentallocatedsize.md)
