OSRLogo
OSRLogoOSRLogoOSRLogo x Seminar Ad
OSRLogo
x

Everything Windows Driver Development

x
x
x
GoToHomePage xLoginx
 
 

    Mon, 11 Dec 2017     115613 members

   Login
   Join


 
 
Contents
  Online Dump Analyzer
OSR Dev Blog
The NT Insider
Downloads
ListServer / Forum
Driver Jobs
  Express Links
  · The NT Insider Digital Edition - May-June 2016 Now Available!
  · Windows 8.1 Update: VS Express Now Supported
  · HCK Client install on Windows N versions
  · There's a WDFSTRING?
  · When CAN You Call WdfIoQueueP...ously

ExAllocatePoolWithQuota Raises Exceptions

Right in the midst of my busy schedule, I happened to be up in Redmond. A dev from the Windows group stops me and says "OK, Mr. Know-It-All Rodriguez, answer me this: Are there any flavors of ExAllocatePool that will raise an exception by default?"

After exchanging a few pleasantries (suitable for "internal use only") he finally gave me the answer: By default, ExAllocatePoolWithQuota and it's friend ExAllocatePoolWithQuotaTag will raise an exception if the request can't be fullfilled because of quota contraints.

With all of us being more security and resource conscious, it's often a good idea to use ExAllocatePoolWithQuotaTag when allocating storage on behalf of a user. Just be sure to guard that call with a try / except block.

Related Articles
Must Succeed Pool...DEAD!
Who Owns Which Pool Tag
No Pool Tagging for Special Pool
Permanent Pool Overrun Checking Starting With XP SP2
Inlining into SEH Filters Can Result in Invalid Code on AMD64
Pool and Memory Events
Exceptional Behavior - x64 Structured Exception Handling

User Comments
Rate this article and give us feedback. Do you find anything missing? Share your opinion with the community!
Post Your Comment

"Which kind of exceptions will be raised by ExAllocatePoolWithQuota?"
Since there are many exception codes defined, maybe I guess the default exception that raised by this routine is EXCEPTION_ACCESS_VIOLATION? Is that right? Thanks.

Rating:
20-Oct-05, Phillip Shentu


Post Your Comments.
Print this article.
Email this article.

Writing WDF Drivers I: Core Concepts
LAB

Nashua (Amherst), NH
15-19 May 2017

Writing WDF Drivers II: Advanced Implementation Techniques
LAB

Nashua (Amherst), NH
23-26 May 2017

Kernel Debugging and Crash Analysis
LAB

Dulles (Sterling), VA
26-30 Jun 2017

Windows Internals and Software Driver Development
LAB

Nashua (Amherst), NH
24-28 Jul 2017

 
 
 
 
x
LetUsHelp
 

Need to develop a Windows file system solution?

We've got a kit for that.

Need Windows internals or kernel driver expertise?

Bring us your most challenging project - we can help!

System hangs/crashes?

We've got a special diagnostic team that's standing by.

Visit the OSR Corporate Web site for more information about how OSR can help!

 
bottom nav links