Function: free_physical
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Frees the physical memory allocated by the acl.rt.malloc_physical call.
Prototype
- C Prototype
1aclError aclrtFreePhysical(aclrtDrvMemHandle handle)
- Python Function
1ret = acl.rt.free_physical(handle)
Parameter Description
Parameter |
Description |
|---|---|
handle |
Int, handle of the physical address to be freed. |
Return Value Description
Return Value |
Description |
|---|---|
ret |
Int, error code: 0 on success; else, failure. |
Restrictions
- This API is not supported in the Ascend RC form.
- If the physical memory is mapped to virtual memory, you need to unmap them by calling acl.rt.unmap_mem before freeing the physical memory.
Parent topic: Memory Management