Re: Utility to view the list of system virtual memory blocks

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Mark Roddy (markr_at_hollistech.com)
Date: 11/04/04


Date: Thu, 4 Nov 2004 07:33:35 -0500

In article <#PQ03XMwEHA.2568@TK2MSFTNGP11.phx.gbl>, p-
a.oberson_news@fastware.ch says...
> Hello,
>
> I search an utility that is able to display the list of system virtual
> memory blocks.
>
> I create a driver that must map a big memory block to non-paged system
> memory. Sometimes the function MmGetSystemAddressForMdlSafe returns a
> null pointer. I suspect that is no more area to map a big memory block
> (8 MBytes) into the virtual system memory.
>
> Thanks for your help
>
> Pierre-Alain
>
8MB is not so big, but yes this can happen and your driver must be able to deal
with temporary resource shortages. MmGetSystemAddressForMdlSafe consumes system
ptes, not non-paged pool, so you are likely running out of ptes. It is possible
to pre-allocate ptes - see MmAllocateMappingAddress,
MmMapLockedPagesWithReservedMapping, MmUnmapReservedMapping, and
MmFreeMappingAddress.

If you are processing series of fixed size buffers, you might consider such a
pre-allocation strategy in order to not have to deal with resource allocation
failures outside of your device initialization routine.

-- 
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com