Call stack more limited on Xbox 360 than Windows?
Hi,
I am working on a program that uses heavy recursion. It works fine on Windows but is causing problems on the Xbox 360.
I switched to a very simple test app. It is just the default "Windows Game" or "Xbox 360 Game", with the following additional method:
public void TestRecursion(int level)
{
if (level >= 14000)
return;
else
TestRecursion(level + 1);
}
And I call TestRecursion(0) from Game1.Initialize().
On Windows, I don't get a stack overflow error til somewhere between 13000 and 14000.
On the Xbox 360, if I go somewhere between 900 and 1000, I get this error:
The remote connection to the device has been lost. Please verify the device connection and restart debugging.
Is there a hardcoded stack depth of 1000 on the 360? Or just a smaller total system stack size? Is there a way to alter the stack size?
I can rewrite my algorithm to use its own stack instead of recursion...but it makes me grumpy.
Thanks,
-Mike

