aclrtMemGetAccess
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Obtains the memory access permission.
Prototype
aclError aclrtMemGetAccess(void *virPtr, aclrtMemLocation *location, uint64_t *flag)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
virPtr |
Input |
Start address of the virtual memory. The value must be the same as the aclrtMapMem API's virPtr address. |
location |
Input |
Memory location. Currently, aclrtMemLocation.type can only be set to ACL_MEM_LOCATION_TYPE_HOST or ACL_MEM_LOCATION_TYPE_DEVICE. If aclrtMemLocation.type is set to ACL_MEM_LOCATION_TYPE_HOST, aclrtMemLocation.id is invalid and can be fixed at 0. |
flag |
Output |
Memory access protection flag. |
Returns
0 on success; else, failure. For details, see aclError.
Parent topic: Memory Management