Knowledge Base

PRB: "Ring 0 Stack Not Aligned" Error Message

PSS ID Number: 178654

Article Last Modified on 3/6/1999


The information in this article applies to:


This article was previously published under Q178654

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: kbprb KB178654
Technology: kbAudDeveloper kbWin32DDK95 kbWin32DDKSearch kbWin32sSearch kbWin95search kbWinDDKSearch