---
title: getLength
framework: kernel
role: pseudoSymbol
path: kernel/iomemorydescriptor/1812776-getlength
---

# getLength

Accessor to get the length of the memory descriptor (over all its ranges).

## Declaration

```occ
virtual IOByteCount getLength() const; 
```

## Return Value

Return Value The byte count.

## Overview

Overview This method returns the total length of the memory described by the descriptor, ie. the sum of its ranges' lengths.

## See Also

### Getting the Descriptor Information

- [getDirection](kernel/iomemorydescriptor/1812765-getdirection.md)
- [getDirection](kernel/iomemorydescriptor/1441925-getdirection.md)
- [getLength](kernel/iomemorydescriptor/1442036-getlength.md)
- [GetLength](driverkit/iomemorydescriptor/getlength.md)
- [getDMAMapLength](kernel/iomemorydescriptor/3553361-getdmamaplength.md)
- [getFlags](kernel/iomemorydescriptor/2870265-getflags.md)
- [getMetaClass](kernel/iomemorydescriptor/1442096-getmetaclass.md)
