---
title: IOFlushProcessorCache
framework: kernel
role: symbol
role_heading: Function
path: kernel/1575308-ioflushprocessorcache
---

# IOFlushProcessorCache

Flushes the processor cache for mapped memory.

## Declaration

```occ
IOReturn IOFlushProcessorCache(task_t task, IOVirtualAddress address, IOByteCount length);
```

## Parameters

- `task`: Task the memory is mapped into.
- `address`: Virtual address of the memory.
- `length`: Length of the range to set.

## Return Value

Return Value An IOReturn code.

## Discussion

Discussion This function flushes the processor cache of an already mapped memory range. Note in most cases it is preferable to use IOMemoryDescriptor::prepare and complete to manage cache coherency since they are aware of the architecture's requirements. Flushing the processor cache is not required for coherency in most situations.

## See Also

### Mapped Memory

- [IOMapper](kernel/iomapper.md)
- [IOMemoryMap](kernel/iomemorymap.md)
- [IOMappedRead16](kernel/1575322-iomappedread16.md)
- [IOMappedRead32](kernel/1575311-iomappedread32.md)
- [IOMappedRead64](kernel/1575301-iomappedread64.md)
- [IOMappedRead8](kernel/1575317-iomappedread8.md)
- [IOMappedWrite16](kernel/1575315-iomappedwrite16.md)
- [IOMappedWrite32](kernel/1575310-iomappedwrite32.md)
- [IOMappedWrite64](kernel/1575313-iomappedwrite64.md)
- [IOMappedWrite8](kernel/1575318-iomappedwrite8.md)
- [IOMapperIOVMAlloc](kernel/1532986-iomapperiovmalloc.md)
- [IOMapperIOVMFree](kernel/1532978-iomapperiovmfree.md)
- [IOMapperInsertPage](kernel/1532970-iomapperinsertpage.md)
