Re: non-paged memory inside a kernel driver



you will not get such a number. let's say 20 instance of such a driver was loaded and the number was 10%. then at least half of them would not be able to load. moreover, it depends on the state of system memory when you try to allocate memory, the virtual address space has to have a big enough gap (e.g. it is not fragmented) to fit your allocation.

what are you going to do with the memory once you have
allocated it?

d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"krish" <pradeep_bisht@xxxxxxxxx> wrote in message news:551587ae-46e4-49bb-bb70-06900bca6125@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Don, large is kind of relative term :-). Would you suggest any
number in terms of percentage of the available memory like 10%, 20%
etc which you think is safe enough? Or from your experience, what is
the largest amount that you have seen in a well performing kernel mode
driver? Thanks.

On Mar 31, 2:01 pm, "Don Burn" <b...@xxxxxxxxxxxxxxxxxxxx> wrote:
Pre-Vista it is 128MB, but even in Vista doing a large allocate is a really
bad idea, since then the rest of the system will be starved, and likely to
crash.

--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website:http://www.windrvr.com
Blog:http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply

"krish" <pradeep_bi...@xxxxxxxxx> wrote in message

news:a4bc5006-05a9-4340-8e3c-b7a2ca72cf76@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> Hi, what is the maximum size of non-paged memory that I can allocate
> inside inside my kernel driver in XP and Vista? I took the diskperf
> from WDK, modified it and on Vista, 32-bit, 2GB RAM, I tried
> allocating 4/8/100/512 MB and I was able to do it successfully while
> allocating 1GB and above failed. Is there any hard restriction on the
> amount of non-paged memory I can allocate inside my driver?

> Thanks in anticipation.


.



Relevant Pages

  • Re: non-paged memory inside a kernel driver
    ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... With their stuff running I cannot allocate 10 MB 's on a XP system. ... so I need 100MB of non-paged memory inside my driver. ...
    (microsoft.public.development.device.drivers)
  • Re: Memory fragmentation issue in kernel mode
    ... Also, on the Performance tab, watch the Kernel Memory section. ... fragmentation, which is actually fragmentation of the system virtual ... A user level application doesn't allocate and even access the ... I have my driver that uses direct IO to perform data transfer ...
    (microsoft.public.development.device.drivers)
  • [PATCH] Integrating SEP Driver with RAR Driver
    ... RAR stands for Restricted Access Region; this is memory ... This is upstream revision 4 of the SEP driver. ... +This functions maps and allocates the shared area on the external ...
    (Linux-Kernel)
  • Re: non-paged memory inside a kernel driver
    ... I've seen kernel memory leaks up to full memory exaustion when Symantec AV ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... With their stuff running I cannot allocate 10 MB 's on a XP system. ...
    (microsoft.public.development.device.drivers)
  • Re: Memory allocation in windows kernel driver
    ... in an allocated zone of memory. ... I have to allocate a space of about 255 kBytes. ... I would strongly recomend you take a class on driver development. ... It is possible to create a pointer to an array of pointers to memorize ...
    (microsoft.public.development.device.drivers)