Shared Memory Problem

Hi all!

I have a driver that is sharing memory with the user mode application for fast data exchange. Over the years this has proven to work well.
Now as the the hardware evolves larger buffers are required. Typically users register about 10 buffers @ 10 MByte when starting data acquistion and free them when done. This is done repeatedly. After a while the call MmGetSystemAddressForMdlSafe() fails when registering the buffers.

Currently I am observing this on a Window7 (x32) system with 4GB RAM. I first suspected running out of PTEs but the performance monitor indicates that there are plenty available. After re-reading the MSDN, WDK documentation I still have no clue what limit I am hitting.

Any ideas?

/Hartmut

Well… You’re not giving us much to go on here. How and when are the buffers allocated? How and when are the buffers DEallocated? How many buffers do you have allocated simultaneously? How many buffers do you need to allocate on a given system before you get the error? Is the number always the same?

What steps have you taken to debug the problem so far, other than looking at Performance Monitor and posting here?

We’ll be happy to help, I’m sure, but you DO have to give us some data…

Peter
OSR

System address space could be fragmented such that there is lots of space that could be used for system PTE mappings, but no contiguous region is large enough for a 10 MB mapping. Check the output of !vm 21 after MmGetSystemAddressForMdlSafe fails and see what the largest contiguous region is.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@baslerweb.com
Sent: Tuesday, December 07, 2010 7:36 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Shared Memory Problem

Hi all!

I have a driver that is sharing memory with the user mode application for fast data exchange. Over the years this has proven to work well.
Now as the the hardware evolves larger buffers are required. Typically users register about 10 buffers @ 10 MByte when starting data acquistion and free them when done. This is done repeatedly. After a while the call MmGetSystemAddressForMdlSafe() fails when registering the buffers.

Currently I am observing this on a Window7 (x32) system with 4GB RAM. I first suspected running out of PTEs but the performance monitor indicates that there are plenty available. After re-reading the MSDN, WDK documentation I still have no clue what limit I am hitting.

Any ideas?