MxbsMalloc
Function Usage
Memory allocation function, which determines whether the memory is for a host, device, or DVPP by assigning a value to the type structure of MemoryData. size in MemoryData is used to specify the memory size. deviceid in MemoryData is used to specify the device memory ID. To destroy the allocated memory, use the MxbsFree function.
Prototype
1 | static APP_ERROR MemoryHelper::MxbsMalloc(MemoryData& data); |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
data |
Input |
Memory data to be allocated. The input is the memory type and size, which are assigned to data.type and data.size respectively. The output is the allocated memory pointer, which is assigned to data.ptrData. The value range of data.size is [1, 4294967296]. |
Response Parameters
Data Structure |
Description |
|---|---|
APP_ERROR |
For details about the returned error codes, see APP_ERROR Description. |
Parent topic: MemoryHelper