PRB: "Ring 0 Stack Not Aligned" Error MessageLast reviewed: January 9, 1998Article ID: Q178654 |
The information in this article applies to:
SYMPTOMSWhen running with the Windows 95 DDK debug binaries, the error message "ERROR: Ring 0 Stack Not Aligned" may occasionally appear.
CAUSEThis 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.
RESOLUTIONThis 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.
REFERENCESWindows 95 DDK documentation on _Debug_Flags_Service Version : WINDOWS:4.0 Platform : WINDOWS Issue type : kbprb |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |