[wdmaudiodev] IPortWaveRTStream::AllocateContiguousPagesForMdl problem in Windows 7

  • From: "Jeff Pages" <jeff@xxxxxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 13 Mar 2009 09:57:19 +1100

I'm testing our WaveRT drivers on the x64 beta release of Windows 7, and am 
finding that IPortWaveRTStream::AllocateContiguousPagesForMdl frequently (but 
not always) returns NULL even when the amount of memory requested is less than 
one page, whereas IPortWaveRTStream::AllocatePagesForMdl always succeeds.

In this particular scenario, I'm allocating memory for the descriptor table I 
need to pass to my scatter-gather hardware, and while it's mostly much less 
than one page long, there's a possibility with high sampling rates, extended 
bit depths and a large buffer that it could end up longer than a page, which is 
why I'm using AllocateContiguousPagesForMdl. This works fine under Vista.

Is there any reason not to use AllocateContiguousPagesForMdl for allocations 
that might be smaller than one page?

Jeff

Other related posts: