Last active
November 13, 2017 03:44
-
-
Save ss1h2a3tw/2adc036fe229847e401d4893c28935fa to your computer and use it in GitHub Desktop.
Simple stack size testing
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
| #include <cstdio> | |
| int main (){ | |
| char a[8*1024*1024]; | |
| a[sizeof(a)-1]=0; | |
| asm volatile (""::"g"(a):"memory"); | |
| printf("Success! %lld\n",(long long)sizeof(a)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment