申请物理地址空间,并返回一个物理内存handle。
Ascend RC形态不支持调用本接口。
aclError aclrtMallocPhysical(aclrtDrvMemHandle *handle, size_t size, const aclrtPhysicalMemProp *prop, uint64_t flags)
参数名 |
输入/输出 |
说明 |
---|---|---|
handle |
输出 |
存放物理地址信息的handle。 |
size |
输入 |
物理地址空间大小,单位Byte。 size当前需按照2M对齐。 |
prop |
输入 |
物理内存属性信息。 |
flags |
输入 |
预留,当前只能设置为0。 |
返回0表示成功,返回其它值表示失败。