Hi,
I need an DMA-Buffer on an X86 System which does not ly in the process
address space. Finaly I managed thi with the help of Mike Hall in the
following way:
dma_pci.InterfaceType=PCIBus;
dma_pci.BusNumber=0;
dma_pci.ObjectSize=sizeof(DMA_ADAPTER_OBJECT);
LPVOID pVA = HalAllocateCommonBuffer( &dma_pci, size,
&(Buffers[bufferIndex].dmaAdress), false);
LPVOID pVAShared = VirtualAlloc(NULL, size, MEM_RESERVE, PAGE_NOACCESS);
VirtualCopy (pVAShared, pVA , size , PAGE_NOCACHE | PAGE_READWRITE);
VirtualFree (pVA, 0, MEM_RELEASE);
return pVAShared;
But If I try to frre pVAShared with VirtualFree it doesn't work. I don't get
an error, but not all Memory is freed, even after exit of the process.
Any Idea?
Best regards
Thomas