Silly question, you are UNlocking those locked pages?
-Jeff
-----Original Message-----
From: Bill [mailto:xxxxx@endwell.net]
Sent: Friday, February 21, 2003 1:20 PM
To: File Systems Developers
Subject: [ntfsd] Re: When MmMapLockedPagesSpecifyCache fails…
> Never looked at TaskManager while this was going on. I’ll try to do so
next
> test run.
One down, one to go:-) Curious - if you allocate MDLs, do you free
them?
(You’d be surprised how often this happens)
I do allocate an MDL during read operations, in the NOT IRP_PAGING_IO
case. In that case, I alloc the MDL and do a MmProbeAndLock. I note in
my context structure that there is a free that needs to be done. All
indications are that it is getting done.
OK. DriverVerifier does not show an increase in NP Pool by my filter
driver, but I took a look at TaskManager and I do see a monotonic increase
in the NP Pool assigned to my test program. It works with my filter -
they exchange info on file open/close/read/rename etc. I used
METHOD_BUFFERED for all those ins and outs. No mapping gets down in my
ioctl routines. Since it is METHOD_BUFFERED, the I/O manager is
allocating buffer space in the system pool. Is it possible that these
allocations are not being freed? Under what circumstances?
> I mis-spoke when I said “lookaside”. I know that is a particular name
for a
> kernel functionality. What I meant was that I create my own small queue
of
> needed structure allocations upon DriverEntry and keep them reserved
for my
> use.
That’s exactly what I thought you’d do - do constant allocate/free
during testing! That will allow you to trace any memory corruption error.
Doing your own queue will prevent error on free catches, such as double
frees
- and if you use a lookaside type queue, you’d have the same buffer twice!
Leading to certain corruption of memory.
I had that mindset at the beginning. I ‘aggresively’ alloc’ed and freed
everything I needed as needed. The long stress runs that caused me
failures led me to implement my own private queuing. I do not see in my
logs any evidence of having to grow that pool - backing my claim that I’m
not leaking (at least not on those objects).
You are currently subscribed to ntfsd as: xxxxx@concord.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
the latest virus scan software available for the presence of computer
viruses.
**********************************************************************