Re: Looking for KMDF alternative to MmAllocateContiguousMemorySpecifyCache

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Why do you need contiguous memory? Do you need it for DMA purposes?

There is no direct KMDF equivalent of this function. WdfCommonBuffer will
give you contiguous memory but you need to allocate a DMA enabler object
first.

Yes it's okay to use WDM and KMDF function in a driver however you should
try to find out if there a KMDF equivalent and use that (just like you are
doing now) because we provide KMDF equivalent to a WDM function only if
there is any value add in doing so in terms of better and simple programming
pattern, eliminating common mistakes, improving reliability, diagnosability,
etc.

We have come up with a porting table that will help you in quickly
identifying which concept of WDM maps to KMDF.

http://www.microsoft.com/whdc/driver/wdf/WDF_Port.mspx

-Eliyas


.