aclrtFree
Description
Frees device memory.
Restrictions
- The aclrtFree API can release only the memory allocated through the aclrtMalloc API, aclrtMallocCached API, or aclrtMallocAlign32 API.
- This API immediately releases the input memory. No implicit device synchronization or stream synchronization is performed within the function. Ensure that the memory pointer is not accessed after this API is called.
Prototype
aclError aclrtFree(void *devPtr)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
devPtr |
Input |
Pointer to memory to free. If a null pointer is passed, this API will return an error. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.
Parent topic: Memory Management