I don’t seem to have an IoAllocateSrb in my ddk. Which OS are you building
this for?
At any rate neither IRP nor SRB allocations ought to fail on your system.
They are both small blocks and you do not appear to have a memory shortage.
=====================
Mark Roddy
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Anees M
Sent: Tuesday, April 12, 2005 1:51 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Physical memory usage
I have a function that creates an IRP by calls to IoAllocateSrb and
IoAllocateIrp which is failing. I am analyzing a crash dump and doesnt have
a repro or a live machine to try this out. I still dont know which among the
above two calls is failing as the crash occurs at a later point in the stack
after this function had actually returned, and would be rather interested in
knowing/isolating the reasons for why they might have failed and could fail
in the future.
Thanks
Anees
On Apr 12, 2005 10:57 PM, Graham, Simon wrote:
> OK - nothing obviously wrong here you have PLENTY of physical memory
> available – so, tell us more about the exact allocation call that
> is failing… (type, size, etc)
>
> /simgr
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Anees M
> Sent: Tuesday, April 12, 2005 1:02 PM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] Physical memory usage
>
> I’ve tried to going thru the !memusage output, put to be frank i dont
> know on how exactly i map it to a conclusion on what/who is eating up
> the memory. Here is the summary of the command output
>
> 0: kd> !memusage
> loading PFN database
> loading (100% complete)
> Compiling memory usage data (99% Complete).
> Zeroed: 1947857 (15582856 kb)
> Free: 7 ( 56 kb)
> Standby: 14983 (119864 kb)
> Modified: 145 ( 1160 kb)
> ModifiedNoWrite: 0 ( 0 kb)
> Active/Valid: 133200 (1065600 kb)
> Transition: 9 ( 72 kb)
> Unknown: 0 ( 0 kb)
> TOTAL: 2096201 (16769608 kb) Building kernel map
> Finished building kernel map
>
> On Apr 12, 2005 6:35 PM, Graham, Simon wrote:
> > !memusage is another command that is useful in these circumstances
> > – it will summarize physical page usage (and I would guess you have
> > a lot of modified pages or possibly even mod-nowrite pages if there
> > is a bug in
> your
> > driver) as opposed to virtual usage that !vm shows.
> >
> > /simgr
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Anees M
> > Sent: Tuesday, April 12, 2005 1:16 AM
> > To: Windows System Software Devs Interest List
> > Subject: Re: [ntdev] Physical memory usage
> >
> > Don/Mats,
> >
> > Thanx for your answers, I agree that i have a bug in my code which
> > doesn’t handle allocation failures properly, but i am sure my driver
> > is not leaking memory. What I am rather interested in is to know why
> > there is a physical memory extensive usage even though the paged/non
> > paged pool usage , PTE usage etc displayed by the !vm extension is
> > no where near the maximum limits.
> >
> > Thanks again,
> > Anees
> >
> > On Apr 11, 2005 7:14 PM, Don Burn wrote:
> > > Actaully, the more generic answer is that since your driver
> > > crashes due
> to
> > a
> > > memory allocation failure, you have a bug in your driver.
> > >
> > > –
> > > Don Burn (MVP, Windows DDK)
> > > Windows 2k/XP/2k3 Filesystem and Driver Consulting Remove StopSpam
> > > from the email to reply
> > >
> > > “Mats PETERSSON” wrote in message
> > > news:xxxxx@ntdev…
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > The generic answer to large memory usage would be that some
> > > > process is hogging or leaking memory. Which of the two is hard
> > > > to say without
> > knowing
> > > > much more about what’s going on in the system… One suspect for
> > > > this
> is
> > > > obviously your driver, either directly (you allocate memory
> > > > without
> > regard
> > > > to others or loosing track of it) or indirectly (you make calls
> > > > to
> some
> > > > system component that causes it to allocate memory on your
> > > > behalf, and then don’t free up the resource).
> > > >
> > > > But that’s obviously pure speculation, and there may be all
> > > > sorts of
> > other
> > > > causes/reasons for this behaviour.
> > > >
> > > > –
> > > > Mats
> > > >
> > > >
> > > > xxxxx@lists.osr.com wrote on 04/11/2005 02:11:43 PM:
> > > >
> > > >> Hello all,
> > > >> On an IA 64 box with Windows 2003 and service pack1 I am seeing
> > > >> allocation calls from my driver failing and there by causing a
crash.
> > > >> If I analyze the memory usage from the crash using !vm I see
> extensive
> > > >> physical memory usage,but the rest of the info seems normal. In
> > > >> all the scenarios of low memory that I have seen earlier, I
> > > >> used to see extensive paged pool usage or PTE exhaustion which
> > > >> leads to these
> type
> > > >> of issues. I know how to fix/prevent the crash from my driver,
> > > >> but was more interested in knowing what exactly would lead to
> > > >> the extensive physical memory usage. Any hints ?
> > > >>
> > > >> I have pasted the !vm o/p below
> > > >>
> > > >> 0: kd> !vm
> > > >>
> > > >> Virtual Memory Usage
> > > >> Physical Memory: 2096201 (16769608 Kb)
> > > >> Page File: ??\C:\pagefile.sys
> > > >> Current: 2095104Kb Free Space: 2087040Kb
> > > >> Minimum: 2095104Kb Maximum: 4190208Kb
> > > >> Available Pages: 1962847 (15702776 Kb)
> > > >> ResAvail Pages: 145 ( 1160 Kb)
> > > >>
> > > >> Running out of physical memory
> > > >>
> > > >> Locked IO Pages: 154 ( 1232 Kb)
> > > >> Free System PTEs: 16764123 (134112984 Kb)
> > > >> Free NP PTEs: 817150 ( 6537200 Kb)
> > > >> Free Special NP: 0 ( 0 Kb)
> > > >> Modified Pages: 145 ( 1160 Kb)
> > > >> Modified PF Pages: 121 ( 968 Kb)
> > > >> NonPagedPool Usage: 4497 ( 35976 Kb)
> > > >> NonPagedPool Max: 834559 ( 6676472 Kb)
> > > >> PagedPool 0 Usage: 1348 ( 10784 Kb)
> > > >> PagedPool 1 Usage: 118 ( 944 Kb)
> > > >> PagedPool 2 Usage: 120 ( 960 Kb)
> > > >> PagedPool 3 Usage: 116 ( 928 Kb)
> > > >> PagedPool 4 Usage: 114 ( 912 Kb)
> > > >> PagedPool Usage: 1816 ( 14528 Kb)
> > > >> PagedPool Maximum: 3338240 (26705920 Kb)
> > > >> Shared Commit: 1472 ( 11776 Kb)
> > > >> Special Pool: 0 ( 0 Kb)
> > > >> Shared Process: 2900 ( 23200 Kb)
> > > >> PagedPool Commit: 1816 ( 14528 Kb)
> > > >> Driver Commit: 1978 ( 15824 Kb)
> > > >> Committed pages: 81551 ( 652408 Kb)
> > > >> Commit limit: 2302966 (18423728 Kb)
> > > >>
> > > >> Total Private: 69449 ( 555592 Kb)
> > > >>
> > > >>
> > > >> Thanks in advance
> > > >> Anees
> > > >>
> > > >> —
> > > >> Questions? First check the Kernel Driver FAQ at http://www.
> > > >> osronline.com/article.cfm?id=256
> > > >>
> > > >> You are currently subscribed to ntdev as:
> > > >> xxxxx@3dlabs.com To unsubscribe send a blank email to
> > > >> xxxxx@lists.osr.com
> > > >
> > > >> ForwardSourceID:NT000107B6
> > > >
> > > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@gmail.com To
> > > unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@stratus.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@gmail.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@stratus.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@gmail.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com