I've had more problems with the stack than probably any other area of Windows CE. Most of the time for small apps the stack is not an issue. However for more complex apps that consume more of the stack real headaches can occur. One of the biggest issues is that you have to specify the stack size manually. If you get to the point your stack is not large enough, then some of the most bizarre behavior occurs during runtime that is extremely hard to diagnose. With VC++ 6.0 it is smart enough to figure out how big the stack needs to be on its own.
Now I seem to be having another problem. It seems if the stack size I specify is too large, then I have bizarre runtime problems even though I'm not running out of space. I'm trying to use a 2 MB stack. My hunch is the the OS cannot give me 2 MB stack space, yet my app is using all of the 2 MB even though I don't use that much at one time. So when it accesses past what the OS allocated weird things happen. Does that sound realistic?
Anyone know of what the maximum stack size is for CE? Anyone know of a method to somehow have CE gracefully report when the app runs out of stack space?
Any insight would be greatly appreciated.
Dan East
Now I seem to be having another problem. It seems if the stack size I specify is too large, then I have bizarre runtime problems even though I'm not running out of space. I'm trying to use a 2 MB stack. My hunch is the the OS cannot give me 2 MB stack space, yet my app is using all of the 2 MB even though I don't use that much at one time. So when it accesses past what the OS allocated weird things happen. Does that sound realistic?
Anyone know of what the maximum stack size is for CE? Anyone know of a method to somehow have CE gracefully report when the app runs out of stack space?
Any insight would be greatly appreciated.
Dan East