RtlCopyMemoryNonTemporal - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H
#if defined(_M_AMD64) || defined(_M_ARM64)

NTSYSAPI
VOID
NTAPI
RtlCopyMemoryNonTemporal(
   _Out_writes_bytes_all_(Length) VOID UNALIGNED *Destination,
   _In_reads_bytes_(Length) CONST VOID UNALIGNED *Source,
   _In_ SIZE_T Length
   );

#endif
#endif

View code on GitHub
#ifndef _NTRTL_H
#if defined(_M_AMD64) || defined(_M_ARM64)
// ...
#else

#define RtlCopyMemoryNonTemporal RtlCopyMemory

#endif
#endif

View code on GitHub
// wdm.h

NTSYSAPI VOID RtlCopyMemoryNonTemporal(
  VOID       *Destination,
  const VOID *Source,
  SIZE_T     Length
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-rtlcopymemorynontemporal)

RtlCopyMemoryNonTemporal function

Description

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.

Parameters

Length

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

Source

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

Destination

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

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.

See also

RtlCopyMemory