PRB: "Ring 0 Stack Not Aligned" Error Message

ID: Q178654


The information in this article applies to:


SUMMARY


REFERENCES

Windows 95 DDK documentation on _Debug_Flags_Service


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          : 
Version           : WINDOWS:4.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: March 4, 1999