Low Memory Situations

Hello Gurus
What is the main objective of Low memory situation test in Driver verifier?
Is it to check whether the driver crashes and gives a bug check under low
memory situations or is it to ensure that all operations in ur system
succeed even though u have a low memory situation.
To illustrate some of the operations do not succeed because we return a
STATUS_INSUFFICIENT_RESOURCES if a particular memory is not allocated. Hence
we get some crazy error messages say for example “Iexplore.exe has generated
errors and will be closed by windows. You will need to restart the program”.
Is this normal or Any//All operation has to succeed even under Low memory
situations…???
Regards
Shal

Shalini wrote:

What is the main objective of Low memory situation test in Driver verifier?
>

The purpose is to let you test and evaluate how your driver behaves when
memory becomes momentarily constrained.

Ideally, you’d like your driver to be resilient to low-memory
situations. Wouldn’t it be nice if the driver managed to retry on
allocation failures and just make things seemless? Wouldn’t that be
better for users?

Of course, that’s not always either possible or (depending on what
you’re doing and your organization’s development values) worth the
effort. In this case, your driver should at LEAST return an appropriate
error status to the underlying app.

What you don’t want your driver to EVER do is not check the status of
the allocation, and just “assume” that your call to ExAllocatePool (or
whatever) suceeded. That’ll cause the system to blue screen, which is
not acceptable.

It’s a good set of tests, just not the tests that you need to run every
day all day,

Peter
OSR

It is to ensure that you don’t bugcheck the system under low memory
conditions. This might mean checking your allocations for failure and
cleaning up appropriately (freeing other memory allocated, releasing
locks, etc…) before you complete the request with an error. Or it may
mean building a system to process some reasonable set of requests (ie.
Transfers of <= 64kb) even if there isn’t enough memory to go around,
and to serialize requests in that case so you can always service them.

For example - storage drivers cannot fail I/O requests (read/write) due
to low memory since they may be in the system path being used to free up
pages in order to create more memory. So they have to keep “emergency”
allocations (SRBs, MDLs, IRPs, etc…) and have to have a system to run
requests one at a time when the emergency resources are in use.

-p

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Shalini
Sent: Monday, July 19, 2004 2:26 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Low Memory Situations

Hello Gurus
What is the main objective of Low memory situation test in Driver
verifier?
Is it to check whether the driver crashes and gives a bug check under
low memory situations or is it to ensure that all operations in ur
system succeed even though u have a low memory situation.
To illustrate some of the operations do not succeed because we return a
STATUS_INSUFFICIENT_RESOURCES if a particular memory is not allocated.
Hence we get some crazy error messages say for example “Iexplore.exe has
generated errors and will be closed by windows. You will need to restart
the program”.
Is this normal or Any//All operation has to succeed even under Low
memory situations…???
Regards
Shal


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

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com