Microsoft KB Archive/178654

{|
 * width="100%"|

PRB: "Ring 0 Stack Not Aligned" Error Message

 * }

Q178654

-

The information in this article applies to:


 * Microsoft Win32 Device Driver Kit (DDK) Windows 95

-

SYMPTOMS
When you are running your computer with the Windows 95 DDK debug binaries, the error message "ERROR: Ring 0 Stack Not Aligned" might appear.

CAUSE
This is not an indication of a true error, but rather is a debug message that indicates a possible cause of poor performance. When building a debug version of a VxD, the BeginProc macro calls the VMM service _Debug_Flags_Service to assert various conditions. One of the things that this service does is check if the current value of the stack pointer (ESP) is DWORD aligned, and, if not, it issues the error message. This check is performed because accessing a DWORD argument on the stack that is not DWORD aligned causes two memory accesses instead of one, which can degrade performance if the procedure in question is called frequently.

RESOLUTION
This message is only a warning of possible performance degradation, and typically not a cause for concern. However, if the service in question is being called frequently, please insure that it is called with a DWORD aligned stack to prevent any possible performance degradation.

Keywords :

Issue type : kbprb

Technology : kbAudDeveloper kbWin95search kbWinDDKSearch kbWin32sSearch kbWin32DDK95 kbWin32DDKSearch