---
title: GetLength
framework: Kernel
role: symbol
role_heading: Instance Method
platforms: [driverkit 19.0+, macOS 10.15+]
path: kernel/iomemorymap/3180657-getlength
---

# GetLength

Returns the length of the memory block in bytes.

## Declaration

```occ
uint64_t GetLength(void);
```

## Return Value

Return Value The number of bytes in the memory block.

## Discussion

Discussion The length represents the number of bytes that are accessible to the current process.

## See Also

### Getting the Map Attributes

- [GetAddress](kernel/iomemorymap/3180656-getaddress.md)
- [GetOffset](kernel/iomemorymap/3438204-getoffset.md)
