sanitizerRtMemset
Function
Calls the aclrtMemset interface to initialize the memory, sets the content in the memory to a specified value, and reports the memory initialization information to the detection tool. The actual memory initialization behavior and parameter meanings are the same as those of aclrtMemset.
For details about aclrtMemset, see .
Prototype
aclError sanitizerRtMemset(void *devPtr, size_t maxCount, int32_t value, size_t count, char const *filename, int lineno);
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
devPtr |
Input |
Pointer to the start address of the memory. |
maxCount |
Input |
Maximum memory size, in bytes. |
value |
Input |
Specified value of the initialized memory. |
count |
Input |
Memory size to set, in bytes. |
filename |
Input |
Name of the file where memory initialization is called. |
lineno |
Input |
Number of the line where memory initialization is called. |
Return
0 on success; else, failure.
Examples
For details, see Step 4.