We all know that stack is growing downward, so it's really a straightforward assumption that if we find the address of the last declared variable, we will get out the smallest address in stack, so we could just assume that this address will be our residual available stack.
And i did it, and i got just humongous address {0x000000dc9354f540} = {947364623680}
we know that stack growing downward and we know that we can't go lower than 0.
so a bit of math:
947364623680 / (1024*1024*1024) = 882.302060425
--> Do they imply that i have 882Gb of stack on my machine?!
I test it and obviously get the stack overflow exception after allocating additional 2mb on stack:
uint8 array[1024*1024*2] = {};
And there my question come WTF is this, and how can i get my actual stack size?