Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit: Kernel-Mode Driver Architecture
Function Types

Basically, there are two types of functions:

Frame function
A function that requires a stack frame. A frame function allocates stack space, calls other functions, saves nonvolatile registers, or uses exception handling. It also requires a function table entry. A frame function requires prolog and epilog code. A frame function can dynamically allocate stack space and can employ a frame pointer. A frame function has the full capabilities of this calling standard at its disposal.

If a frame function does not call another function, then it is not required to align the stack. For more information, see Stack Allocation.

Leaf function
A function that does not require a stack frame. A leaf function does not require a function table entry. It cannot call any functions, allocate space, or save any nonvolatile registers. It can leave the stack unaligned while it executes.


Send feedback on this topic
Built on August 05, 2009
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker