aclrtMallocHostWithCfg
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Allocates the host memory (lock page memory). The system ensures that the start address of the memory is 64-byte aligned. Compared with aclrtMallocHost, this API can also specify memory configuration information when allocating memory.
For the
Prototype
aclError aclrtMallocHostWithCfg(void **ptr, uint64_t size, aclrtMallocConfig *cfg)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ptr |
Output |
Pointer to allocated memory. |
size |
Input |
Requested allocation size in bytes. The size cannot be 0. |
cfg |
Input |
Memory configuration. If no configuration is specified, NULL can be passed. |
Returns
0 on success; else, failure. For details, see aclError.