OSRLogo
OSRLogoOSRLogoOSRLogo x OSR Custom Development Services
OSRLogo
x

Everything Windows Driver Development

x
x
x
GoToHomePage xLoginx
 
 

    Thu, 14 Mar 2019     118020 members

   Login
   Join


 
 
Contents
  Online Dump Analyzer
OSR Dev Blog
The NT Insider
The Basics
File Systems
Downloads
ListServer / Forum
  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.
bottom nav links