RtlCopyMemoryNonTemporal function (wdm.h)

This function copies the contents from one buffer to another using non-temporal moves that do not pollute the cache. Note that the buffers shouldn’t overlap.

Syntax

NTSYSAPI VOID RtlCopyMemoryNonTemporal(
  VOID       *Destination,
  const VOID *Source,
  SIZE_T     Length
);

Parameters

Destination

A pointer to the destination memory block to copy the bytes to.

Source

A pointer to the source memory block to copy the bytes from.

Length

The number of bytes to copy from the source to the destination.

Return value

None.

Remarks

RtlCopyMemoryNonTemporal only performs a non-temporal copy for x64-based systems, and only when the Length parameter is 8 bytes or greater. Otherwise, this function is equivalent to RtlCopyMemory.

Callers of RtlCopyMemoryNonTemporal can be running at any IRQL if the source and destination memory blocks are in nonpaged system memory. Otherwise, the caller must be running at IRQL <= APC_LEVEL.

Requirements

Requirement Value
Minimum supported client Available in Windows 2003 and later.
Target Platform Universal
Header wdm.h
DLL NtDll.lib (user mode); NtosKrnl.lib (kernel mode)
IRQL Any level (see Remarks section)

See also

RtlCopyMemory