RE: Returnig or STATUS_INSUFFICIENT_RESOURCES

Obviously you should release any memory that you allocated for the
request so that you don’t leak memory.

You don’t need to worry about releasing other memory to reduce
system-wide memory pressure. Well you might if you’ve got some sort of
cache that you could purge and the cache is real big, but for most cases
don’t bother.

If you’re returning STATUS_INSUFFICIENT_RESOURCES inside your create
routines or control routines that’s fine. You should try to ensure you
have enough memory up front to handle reasonably sized (page-sized or
maybe 64k sized) read or write requests however so that applications can
make forward progress on steady-state I/O.

-p


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Anurag Sarin
Sent: Wednesday, October 06, 2004 7:38 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Returning STATUS_INSUFFICIENT_RESOURCES

Hello Calvin,

Yes.“low resource” is enabled in DV.

But my question is when I go out of memory should I release the memory
in hand and then return STATUS_INSUFFICIENT_RESOURCES or should I not
release memory ?
I am not getting a bug check though . But what is the best practice??

I do get an hang ocasionaly , wondering why?

thanks & regards,
Anurag

-----Original Message-----
From: Calvin Guan [mailto:xxxxx@ati.com]
Sent: Wednesday, October 06, 2004 7:56 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Returning STATUS_INSUFFICIENT_RESOURCES

Is “low resource” enabled in DV?

Calvin Guan Software Engineer
ATI Technologies Inc. www.ati.com

-----Original Message-----
From: Anurag Sarin [mailto:xxxxx@divassoftware.com]
Sent: October 6, 2004 3:03 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Returning STATUS_INSUFFICIENT_RESOURCES

Hello Gurus,

I wanted to get my basics straight. I am making a File system
driver and
basically need UNICODE memory to hold file names . I see that I
am out
of nonpage memory some times. As the routine
ExAllocatePoolWithTag does
not always give me allocated memory, detecting this I pass my
flow to

Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
Irp->IoStatus.Information = 0;
IoCompleteRequest( Irp, IO_NO_INCREMENT );
return STATUS_INSUFFICIENT_RESOURCES;

Then I see that this out of memory thing is there some times as
in the
next Irp I do get an allocated memory ExAllocatePoolWithTag and
every
thing seems to works fine. I see no BSOD and driver just seem
to work
ok just that it hangs the system after some time.

1> Is "Not getting non page memory:- some time " a major flaw I
need to
worry about and need to work with less memory ?

2> Before returning STATUS_INSUFFICIENT_RESOURCES do I free the
current
unicode memory held by me.?? Will Held memory and returning
STATUS_INSUFFICIENT_RESOURCES lead to memory fragmentation ??

3> Could hanging of my driver due to this observation .

Any Ideas?

Regards,
Anurag


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ‘’
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: unknown lmsubst tag
argument: ‘’
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: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com