函数:malloc_host
C函数原型 |
aclError aclrtMallocHost(void **hostPtr, size_t size) |
---|---|
Python函数 |
host_ptr, ret= acl.rt.malloc_host(size) |
函数功能 |
申请Host或Device上的内存,Device上的内存按普通页申请。同步接口。 |
输入说明 |
size:int,申请内存的大小,单位Byte。size不能为0。 |
返回值说明 |
host_ptr:int,指向Host上已分配内存的指针的指针对象。 ret:int,错误码。
|
约束说明 |
|
注意事项 |
无 |
参考资源 |
接口调用示例,参见数据传输。 |
父主题: 内存管理