sanitizerRtMemcpy

Function

Calls the aclrtMemcpy interface to copy the memory and reports the memory copy information to the detection tool. The actual memory copy behavior and parameter meanings are the same as those of aclrtMemcpy.

For details about aclrtMemcpy, see .

Prototype

aclError sanitizerRtMemcpy(void *dst, size_t destMax, const void *src, size_t count, aclrtMemcpyKind kind, char const *filename, int lineno);

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

dst

Input

Pointer to the destination memory address.

destMax

Input

Maximum size of the destination memory address, in bytes.

src

Input

Pointer to the source memory address.

count

Input

Size in bytes to copy.

kind

Input

Reserved. The system determines whether to copy data from the source address to the destination address based on the pointer to the source and destination memory address. If not, an error is reported.

filename

Input

Name of the file where memory copy is called.

lineno

Input

Number of the line where memory copy is called.

Return

0 on success; else, failure.

Examples

For details, see Step 4.