---
title: IORangeAllocator
framework: kernel
role: symbol
role_heading: Class
path: kernel/iorangeallocator
---

# IORangeAllocator

A utility class to manage allocations from a range.

## Declaration

```occ
class IORangeAllocator : OSObject
```

## Overview

Overview The IORangeAllocator class provides functions for allocating ranges, at a fixed or any offset, and freeing them back to a free list. It is useful for describing ranges of memory or address space without requiring storage in the memory - information describing the free elements is kept elsewhere. Ranges are described by a start offset and a size. IORangeAllocator is optionally protected against multithreaded access.

## Topics

### Miscellaneous

- [allocate](kernel/iorangeallocator/1810255-allocate.md)
- [allocateRange](kernel/iorangeallocator/1810314-allocaterange.md)
- [deallocate](kernel/iorangeallocator/1810361-deallocate.md)
- [getFragmentCapacity](kernel/iorangeallocator/1810407-getfragmentcapacity.md)
- [getFragmentCount](kernel/iorangeallocator/1810456-getfragmentcount.md)
- [getFreeCount](kernel/iorangeallocator/1810490-getfreecount.md)
- [init](kernel/iorangeallocator/1810534-init.md)
- [setFragmentCapacityIncrement](kernel/iorangeallocator/1810575-setfragmentcapacityincrement.md)
- [withRange](kernel/iorangeallocator/1810621-withrange.md)

### Instance Methods

- [allocElement](kernel/iorangeallocator/1527740-allocelement.md)
- [allocate](kernel/iorangeallocator/1527746-allocate.md)
- [allocateRange](kernel/iorangeallocator/1527748-allocaterange.md)
- [deallocElement](kernel/iorangeallocator/1527752-deallocelement.md)
- [deallocate](kernel/iorangeallocator/1527758-deallocate.md)
- [free](kernel/iorangeallocator/1527750-free.md)
- [getFragmentCapacity](kernel/iorangeallocator/1527765-getfragmentcapacity.md)
- [getFragmentCount](kernel/iorangeallocator/1527751-getfragmentcount.md)
- [getFreeCount](kernel/iorangeallocator/1527760-getfreecount.md)
- [getMetaClass](kernel/iorangeallocator/1527763-getmetaclass.md)
- [init](kernel/iorangeallocator/1527756-init.md)
- [serialize](kernel/iorangeallocator/1527761-serialize.md)
- [setFragmentCapacityIncrement](kernel/iorangeallocator/1527742-setfragmentcapacityincrement.md)

### Type Methods

- [withRange](kernel/iorangeallocator/1527754-withrange.md)

## Relationships

### Inherits From

- [OSObject](kernel/osobject.md)

## See Also

### Allocation

- [IOMalloc](kernel/1575326-iomalloc.md)
- [IOMallocAligned](kernel/1575291-iomallocaligned.md)
- [IOMallocPageable](kernel/1575327-iomallocpageable.md)
- [IOMallocZero](kernel/3074962-iomalloczero.md)
