aclrtMemRetainAllocationHandle
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Obtains the handle to the physical memory based on the virtual memory address.
If this API is called multiple times, you need to call aclrtFreePhysical the same number of times to free the physical memory handle.
If ACL_ERROR_RT_FEATURE_NOT_SUPPORT is returned, the underlying driver does not support this feature. You need to upgrade the driver package to 26.0.RC1 or later. You can click here to download the driver installation package of the required version on the Firmware & Drivers page and install and upgrade the driver by referring to the corresponding document.
Prototype
1 | aclError aclrtMemRetainAllocationHandle(void* virPtr, aclrtDrvMemHandle *handle) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
virPtr |
Input |
Pointer to "the pointer to the allocated virtual memory address". The value must be the same as the aclrtMapMem API's virPtr address. |
handle |
Output |
Handle for storing physical memory information. For details about the type definition, see aclrtDrvMemHandle. |
Returns
0 on success; otherwise, failure. For details, see aclError.
Restrictions
The Ascend RC form of