I am new in this forum, and have some trouble regarding StackOverflowException
suposse I would want to control StackOverflowException originated by calling a recursive method, that gets the call stack over it's defaults capabilites.
-in my case for my homework this 'd be a call to Ackermann(3,10)- . And... Knowing that is not possible to control StackOverflowException since C# 2.0...
Since I don't know if it is possible in C# to modify memory propierties of the call stack, the only solution left -if it isn't posibly to grow bigger the call stack- would be control thru reading the call stack state, before it overflows...
I 've been told that using threads -tru delegates- and editing its memory properties can help in this case, but... I'm having problems trying this...
|
Any help or suggestion would be appreciated...
Bernhard HillerPosted Aug 31, 2010, 7:37 AM
Helber GalargaPosted Sep 1, 2010, 7:58 PM
Because it is given in the problem im trying to solve, you can`t touch any line of the recursive code... so the idea behind the homework is to use some library -for example StackTRace, StackFrame, or the properties of the threads like stack size - and act before the compiler, i.e print a message and pause the execution just before the compiler throws the StackOverflowException (my idea is to pause the program based on the call stack information before
any help or suggestion would be welcomed...