[in] Size of the allocation.
AllocateMemory
Allocate memory from a device’s memory region.
Syntax
Section titled “Syntax”virtual HRESULT AllocateMemory(UINT64 ullSize, UINT64* pullOffset) abstract;Parameters
Section titled “Parameters”ullSize
pullOffset
[out] Offset into device memory region where memory has been allocated.
Return value
Section titled “Return value”Returns S_OK if successful, otherwise a failure HRESULT.
Remarks
Section titled “Remarks”The AllocateMemory function returns an offset into a device’s memory region that has been allocated for use by this session. If the device is located on the local interface card, the memory can be allocated either on the device itself or on the computer’s system memory.
Example
Section titled “Example”The following example demonstrates use of the AllocateMemory function.
STDMETHODIMP Acme4321::IAcme4321_Configure(){ UINT64 ullOffset; hr = io.Memory.AllocateMemory(100, &ullOffset);
// ...
hr = io.Memory.FreeMemory(ulOffset);
return hr;}