Created
July 23, 2011 06:05
-
-
Save hpcx82/1101091 to your computer and use it in GitHub Desktop.
Check if the stack grow downwards - it is determined by cpu's push/pop instructions, but OS could redefine the behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool IsStackGrowDownwards() | |
{ | |
int mark1 = 0; | |
int mark2 = 0; | |
return &mark2 < &mark1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment