Function: release_mem_address
C Prototype |
aclError aclrtReleaseMemAddress(void *virPtr) |
|---|---|
Python Function |
ret = acl.rt.release_mem_address(vir_ptr) |
Function Usage |
Frees the virtual memory allocated by the acl.rt.reserve_mem_address call. This API needs to work with other APIs to allocate virtual memory with consecutive addresses and maximize the use of physical memory.
|
Input Description |
vir_ptr: int, pointing to the address of the virtual address space to be released. |
Return Value |
ret: int, error code.
|
Restrictions |
This API is not supported in Ascend RC form. If the virtual memory is mapped to physical memory, you need to unmap them by calling acl.rt.unmap_mem before freeing the virtual memory. |
Parent topic: Memory Management