---
title: getCapacity
framework: Kernel
role: symbol
role_heading: Instance Method
platforms: [driverkit 19.0+, macOS 10.15+]
path: kernel/osarray/3180812-getcapacity
---

# getCapacity

Returns count of currently allocated capacity for members in array.

## Declaration

```occ
virtual uint32_t getCapacity(void);
```

```occ
virtual unsigned int getCapacity(void);
```

## Return Value

Return Value Capacity for members in array.

## See Also

### Inspecting an Array

- [getCount](kernel/osarray/3180813-getcount.md)
- [ensureCapacity](kernel/osarray/3180809-ensurecapacity.md)
