#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
);
View code on GitHub#ifndef _NTRTL_H
#if defined(_M_AMD64) || defined(_M_ARM64)
// ...
#else
#define RtlCopyMemoryNonTemporal RtlCopyMemory
View code on GitHub// wdm.h
NTSYSAPI VOID RtlCopyMemoryNonTemporal(
VOID *Destination,
const VOID *Source,
SIZE_T Length
);
View the official Windows Driver Kit DDI referenceNo description available.
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.
LengthThe number of bytes to copy from the source to the destination.
SourceA pointer to the source memory block to copy the bytes from.
DestinationA pointer to the destination memory block to copy the bytes to.
None.
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.