Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

StackOverflowException

With the StackOverflowException are the conditions to be thrown hardcoded or dependent on the machine the code is running on?

I am almost certain the latter but have failed in my searches and don't ask enough questions here.

like image 668
Pat Avatar asked Sep 10 '09 21:09

Pat


2 Answers

From the documentation:

... is thrown when the execution stack overflows because it contains too many nested method calls.

Since the size of the stack is architecture-dependent and can even be overridden on a machine, yes, this value is not hard-coded, though it is generally pretty static on Windows. If I remember correctly, it is 1MB in size by default.

like image 147
Lee Avatar answered Oct 12 '22 23:10

Lee


Although not a perfect match for your question, see also:

How do you change default stack size for managed executable.net

like image 20
Philippe Leybaert Avatar answered Oct 13 '22 00:10

Philippe Leybaert