Non paged kernel memory

Is it possible to allocate contigous 1GB non paged memory in Kernel.


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

I have a 4GB RAM machine which runs win NT .I would like to alllocate a
contigous 1GB non paged memory from Kernel.Is it posssible?Any hints will
be highly appreciated.
Thanks


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

Just Try allocating using ExAllocatePool API.

Regards,
Satish K.S

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, April 25, 2001 5:33 AM
Subject: [ntdev] Non paged kernel memory

> I have a 4GB RAM machine which runs win NT .I would like to alllocate a
> contigous 1GB non paged memory from Kernel.Is it posssible?Any hints will
> be highly appreciated.
> Thanks
>
> —
> You are currently subscribed to ntdev as: xxxxx@aalayance.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

You cannot get more than about 500M of SVA Space under any approach.
If you create threads in the kernel (i.e., process 0), you can set MAX_MEM to 3G, then
have those threads map UVA space up to 2G, but that memory is only accessable
from threads in the system process.

-DH
----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, April 25, 2001 5:33 AM
Subject: [ntdev] Non paged kernel memory

I have a 4GB RAM machine which runs win NT .I would like to alllocate a
contigous 1GB non paged memory from Kernel.Is it posssible?Any hints will
be highly appreciated.
Thanks


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

The total SVA range for NPP and PP together is about 400MB, and
I’ve never heard of anyone being able to get over about 180MB of NPP.

Drivers loaded at boot time get SVA space
in the 0x80000000-9ffffff range, so in theory you could load a driver at
boot time that could allocate a contiguous non-pageable range of say 480MB.
-DH

----- Original Message -----
From: “Satish”
To: “NT Developers Interest List”
Sent: Wednesday, April 25, 2001 5:59 AM
Subject: [ntdev] Re: Non paged kernel memory

Just Try allocating using ExAllocatePool API.

Regards,
Satish K.S

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, April 25, 2001 5:33 AM
Subject: [ntdev] Non paged kernel memory

> I have a 4GB RAM machine which runs win NT .I would like to alllocate a
> contigous 1GB non paged memory from Kernel.Is it posssible?Any hints will
> be highly appreciated.
> Thanks
>
> —
> You are currently subscribed to ntdev as: xxxxx@aalayance.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


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

can we use this calculation for getting non paged pool from kernel

PagedPoolSize and NonPagedPoolSize Values in Windows NT

The information in this article applies to:
Microsoft Windows NT Workstation versions 3.5, 3.51, 4.0
Microsoft Windows NT Server versions 3.5, 3.51, 4.0
Microsoft Windows 2000 Professional
Microsoft Windows 2000 Server
Microsoft Windows 2000 Advanced Server

SUMMARY
Windows NT calculates NonPagedPoolSize and PagedPoolSize based on the amount
of physical memory present in the computer at boot time. This article
describes the algorithms used to calculate these values on an x86- based
computer.

NOTE: The Windows NT 3.5 Resource kit incorrectly describes PagedPoolSize
calculations.
MORE INFORMATION
NonPagedPoolSize and PagedPoolSize are calculated using complex algorithms
based on physical memory size. However, you can use the following formulas
to approximate these values for an X86-based computer.

Definitions
MinimumNonPagedPoolSize = 256K
MinAdditionNonPagedPoolPerMb = 32K
DefaultMaximumNonPagedPool = 1 MB
MaxAdditionNonPagedPoolPerMb = 400K
PTE_PER_PAGE = 1024
PAGE_SIZE=4096

NonPagedPoolSize Calculation
NonPagedPoolSize = MinimumNonPagedPoolSize + ((Physical MB - 4) *
MinAdditionNonPagedPoolPerMB)

EXAMPLE - On a 32 MB x86-based computer:

MinimumNonPagedPoolSize = 256K
NonPagedPoolSize = 256K + ((32 - 4) * 32K) = 1.2 MB

MaximumNonPagedPoolSize = DefaultMaximumNonPagedPool + ((Physical MB - 4) *
MaxAdditionNonPagedPoolPerMB)

If MaximumNonPagedPoolSize < (NonPagedPoolSize + PAGE_SIZE * 16),
then MaximumNonPagedPoolSize = (NonPagedPoolSize + PAGE_SIZE * 16)

IF MaximumNonPagedPoolSize >= 128 MB MaximumNonPagedPoolSize = 128 MB

EXAMPLE - On a 32 MB x86-based computer:

MaximumNonPagedPoolSize = 1 MB + ((32 - 4) * 400K) = 12.5 MB

PagedPoolSize Calculation
Size = (2 * MaximumNonPagedPoolSize) / PAGESIZE Size = (Size + (PTE_PER_PAGE

  • 1)) / PTE_PER_PAGE PagedPoolSize = Size * PAGESIZE * PTE_PER_PAGE IF
    PagedPoolSize >= 192 MB PagePoolSize = 192 MB EXAMPLE - On a 32 MB x86-based
    computer:
    Size = (2 * 12.5M) / 4096 = 6400
    Size = (6400 + (1024 - 1)) / 1024 = 7.25
    PagedPoolSize = 7.25 * 4096 * 1024 = 30MB
    NOTE: If both values are set to zero in the registry, PagedPoolSize will
    calculate to approximately memory size)

The kernel debugger can be used to view these global variables in memory.
The values shown below are for a 32 MB x86-based computer running Windows NT
3.5, build 807:

kd> dd MmDefaultMaximumNonPagedPool
8019e4d4 00100000 (1Mbyte)

kd> dd MmSizeOfNonPagedPoolInBytes
80196188 00120000 (1,179,648)

kd> dd MmMinimumNonPagedPoolSize l1
8019e4cc 00040000 (262144)

kd> dd MmNumberOfPhysicalPages l1
801961ac 00002010 (8208)

kd> dd MmMinAdditionNonPagedPoolPerMb l1
8019e4d0 00008000 (32768)

kd> dd MmMaximumNonPagedPoolInBytes l1
80196310 00c20000 (12713984)

kd> dd MmSizeOfPagedPoolInBytes l1
8019e4dc 02000000 (33554432)

These values may be modified in the registry.

WARNING: Using the Registry Editor incorrectly can cause serious, system-
wide problems that may require you to reinstall Windows NT to correct them.
Microsoft cannot guarantee that any problems resulting from the use of the
Registry Editor can be solved. Use this tool at your own risk.

The page pooled memory management parameters are located in:

HKEY_LOCAL_MACHINE
\SYSTEM
\CurrentControlSet
\Control
\Session Managerl
\Memory Management
For additional information about the /3GB setting, click the article number
below to view the article in the Microsoft Knowledge Base:
Q171793 <…/winnt/q171793.htm> Information on Application Use of 4GT RAM
Tuning
Microsoft Windows 2000
The Windows 2000 memory model increases the amount of nonpaged pool and
paged pool memory available to the system.

A Windows 2000-based 32-bit x 86 computer that is booted without the /3GB
switch is changed to a maximum paged pool of approximately 300-340 MB (from
192 MB in Windows NT 4.0).

With Windows 2000, the amount of nonpaged pool that the operating system can
use is increased to 256 MB (from 128 MB in Windows NT 4.0).

If the server is booted with the /3GB switch enabled, the memory model
remains that same for nonpaged and paged pool as in Windows NT 4.0

-----Original Message-----
From: Dave Harvey [mailto:xxxxx@syssoftsol.com]
Sent: Wednesday, April 25, 2001 4:45 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Non paged kernel memory

The total SVA range for NPP and PP together is about 400MB, and
I’ve never heard of anyone being able to get over about 180MB of NPP.

Drivers loaded at boot time get SVA space
in the 0x80000000-9ffffff range, so in theory you could load a driver at
boot time that could allocate a contiguous non-pageable range of say 480MB.
-DH

----- Original Message -----
From: “Satish”
To: “NT Developers Interest List”
Sent: Wednesday, April 25, 2001 5:59 AM
Subject: [ntdev] Re: Non paged kernel memory

Just Try allocating using ExAllocatePool API.

Regards,
Satish K.S

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, April 25, 2001 5:33 AM
Subject: [ntdev] Non paged kernel memory

> I have a 4GB RAM machine which runs win NT .I would like to alllocate a
> contigous 1GB non paged memory from Kernel.Is it posssible?Any hints will
> be highly appreciated.
> Thanks
>
> —
> You are currently subscribed to ntdev as: xxxxx@aalayance.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


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: xxxxx@nestec.net
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