Skip to content

FreeMemory

Free memory previously allocated using AllocateMemory.

virtual HRESULT FreeMemory(UINT64 ullOffset) abstract;

ullOffset

[in] Offset into device memory region where memory was previously allocated using AllocateMemory.

Returns S_OK if successful, otherwise a failure HRESULT.

The following example demonstrates use of the FreeMemory function.

CoAcme4321.cpp
STDMETHODIMP Acme4321::IAcme4321_Configure()
{
UINT64 ullOffset;
hr = io.Memory.AllocateMemory(100, &ullOffset);
// ...
hr = io.Memory.FreeMemory(ulOffset);
return hr;
}