0
votes

There is a PCI card connected to the PC and we have a GUI for the same. We want to allocate DMA Buffer of about 400 to 600 MB physical memory in RAM in order to read/write from PCI Card (FPGA does Read/Write operation in PCI Card). We are using JUNGO windows PCI driver. There is a WDC_DMAContigBufLock method provided by JUNGO to allocate DMA Buffer through Contiguous or scatter/Gather Methods. We could able to create up to 63MB of buffer in the RAM and could not create more than 63MB. The operating system is Windows XP 32 bit and RAM size is 4GB (Relatively 3 GB is Free).

Application (GUI) is written in C# .Net and trying to create a DMA buffer of 400 – 600MB is through this application. I am looking for solution/Ideas what could be causing/stopping me to create Buffer size of 400 - 600MB.

Thanks

1

1 Answers

3
votes

The pages used for the DMA buffer are allocated from the non-paged kernel memory pool. That's a precious resource in Windows, you cannot reasonably ask for such an enormous allocation. It isn't clear from the docs whether the WD_DMALock() function puts an upper limit on the request or that you are simply asking for way too much and Windows refuses the request or that your machine simply doesn't have that much space in the memory pool. It won't have 500 megabytes, that's for sure. The default size on XP is 256 MB iirc.

More about this in the FAQ. Clearly you cannot reliably make this work as intended, split up the transfer into more reasonably sized smaller requests.