---
title: getCapacity
framework: kernel
role: symbol
role_heading: Instance Method
path: kernel/iobuffermemorydescriptor/1574844-getcapacity
---

# getCapacity

Returns the number of bytes the buffer is capable of holding.

## Declaration

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

## See Also

### Configuring the Descriptor

- [setDirection](kernel/iobuffermemorydescriptor/1574826-setdirection.md)
- [setLength](kernel/iobuffermemorydescriptor/1574850-setlength.md)
