How can I get 800-900 MB of Non-paged memory?

We’re running NTE on x86 systems with .5-1 GB of memory, and we’d like to use most of
that memory for non-paged purposes. My recollection about NT4.0 is that the NPP carves out a
section of SVA space for the NPP, and this limits the NPP size to several hundred MB, even
after adjusting parameters in the registry. This limit seems to be a function of PTEs, rather than
physical memory.

What confuses me is that NT seems to always map SVA 0x80000000-9fffffff to the first .5 G of main memory,
but an ExAllocatePool seems to think that NPP pages always requires their own PTEs.

Does anyone know how to get say 900 MB of non-paged space? Are their tricks to get NT
to use the .5G of SVA space it already has? Is contiguous memory different than NPP? Will allocating
pagable memory and locking it down help?


Dave Harvey, System Software Solutions, Inc.
617-964-7039, FAX 208-361-9395, xxxxx@syssoftsol.com, http://www.syssoftsol.com
Creators of RedunDisks - Robust RAID 1 for embedded systems.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> What confuses me is that NT seems to always map SVA 0x80000000-9fffffff to
the first .5 G of main memory,

Yes.

but an ExAllocatePool seems to think that NPP pages always requires their
own PTEs.

Not necessary. There is a primary nonpaged pool - usualy 0x80xxxxxx - does
not require system PTEs - and expansion pool - which requires system PTEs.
The primary NPP size is fixed (IIRC by some registry setting).

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

There seem to be two possible approaches:

#1. Set MAX_MEM to say 64M, and just use the virtual addresses
in the range 0x84000000-9fffffff that NT just happens to leave
mapped to the first 512M physical memory, regardless of MAX_MEM, by creating
my own memory allocator driver. Yes, this is a BIG hack, and I
assume it won’t work on win2k, and I can’t get more that 448M out
of it, but it does give me 448M of effective NPP memory.

#2 I haven’t tried this. If I load a driver early* enough,
then NT will assign it SVAs in the first 512M range, rather than using
NPP memory for it. I could have this driver have a very large
zero fill array, e.g., “static char x[400*1024*1024];”. The SVA space
for this would use the 0x80000000-9fffffff range, and not the NPP
SVA range.

*How early would be early enough? (I could even
create a private HAL that did this, assuming the loader would
handle it.)

Is something like this feasible? If so, then I if I had 1G of memory,
could I get say 400M by this approach, 130M of NPP, then
lock down some PP memory to end up with a decent amount of
“non-pagable” SVA space?

-DH

----- Original Message -----
From: “Maxim S. Shatskih”
To: “NT Developers Interest List”
Sent: Friday, December 29, 2000 1:34 PM
Subject: [ntdev] Re: How can I get 800-900 MB of Non-paged memory?

> > What confuses me is that NT seems to always map SVA 0x80000000-9fffffff to
> the first .5 G of main memory,
>
> Yes.
>
> > but an ExAllocatePool seems to think that NPP pages always requires their
> own PTEs.
>
> Not necessary. There is a primary nonpaged pool - usualy 0x80xxxxxx - does
> not require system PTEs - and expansion pool - which requires system PTEs.
> The primary NPP size is fixed (IIRC by some registry setting).
>
> Max
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@syssoftsol.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com