OSRLogoOSRLogoOSRLogo x Seminar Ad

Everything Windows Driver Development

GoToHomePage xLoginx

    Thu, 22 Feb 2018     116263 members


  Online Dump Analyzer
OSR Dev Blog
The NT Insider
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.

20-Oct-05, Phillip Shentu

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

Windows Internals and Software Driver Development

Dulles (Sterling), VA
9-13 April 2018

Writing WDF Drivers I: Core Concepts

Manchester, NH
7-11 May 2018

Kernel Debugging and Crash Analysis

Dulles (Sterling), VA
21-25 May 2018


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