KeGetDcacheFillSize

ULONG
KeGetDcacheFillSize(

);

KeGetDcacheFillSize returns the microprocessor's data cache-line boundary in bytes.

Comments

Drivers that do DMA can use the information returned by this routine to avoid cache-line tearing during DMA transfer operations.

Such a driver can use the value returned by KeGetDcacheFillSize to allocate cache-aligned buffers for DMA. Such a driver also can use the value returned by KeGetDcacheFillSize during DMA transfer operations.

For example, in a platform with the processor's data cache aligned on a 16-byte boundary, a DMA device driver should transfer data as an integral number of 16-byte blocks to or from a buffer aligned on a 16-byte boundary if at all possible. Otherwise, cache-line tearing occurs during DMA transfers, which can cause data integrity problems for both the driver and the system.

See Also

ExAllocatePool, HalGetAdapter, IoMapTransfer, KeFlushIoBuffers