Re: Any alternative to the MmAllocateContiguousMemory?
- From: Mark Roddy <markr@xxxxxxxxxxxxxx>
- Date: Sat, 20 Aug 2005 07:31:52 -0400
Elliott wrote:
Are you building for a non NT (98) platform? That is really the only reason to use wdm.h rather than ntddk.h.Hi All,
As I found the MmAllocateContiguousMemory function is not available in WDM architecture, does any alternative to it and provide contiguous memory allocation from non-paged pool? So that we can directly access the allocated memory from both user mode application and physical hardware device under WDM.
Thanks in advance,
Best Regards,
Elliott
WDM beginner
Mapping device memory into user space is discouraged. However if you are going to do this anyway, do not use MmAllocateContiguousMemory - it will not work on all platforms. Instead use AllocateCommonBuffer to allocate the contiguous memory and then either use MmMapLockedPagesSpecifyCache or ZwMapViewOfSection to get the thing into user mode. Better yet have your application send IO requests to your driver and have the drive perform the IO for your application.
--
===================== Mark Roddy DDK MVP Windows 2003/XP/2000 Consulting Hollis Technology Solutions 603-321-1032 www.hollistech.com .
- References:
- Any alternative to the MmAllocateContiguousMemory?
- From: Elliott
- Any alternative to the MmAllocateContiguousMemory?
- Prev by Date: SERVICE_AUTO_START: does driver always starts before user mode service?
- Next by Date: Re: Can I page-out certain memory ?
- Previous by thread: Re: Any alternative to the MmAllocateContiguousMemory?
- Next by thread: Re: Any alternative to the MmAllocateContiguousMemory?
- Index(es):
Relevant Pages
|