Recently, I run into stack overflow problem. The problem went away with either increasing the stack sizeor using heap array compiler option. My question is that if we are going to distribute theexecutibles to end users, which option we should choose, increasing stack size or using heap array compiler option? We know that heap array option makes the program 5% slower for certain cases and no significant slow down for most our cases. Any cons if we increase the stack size while making executibles? I mean what if someone's memory is much smaller than our specified stack size, will it cause problems? I am asking since the recommendation is to use heap array compiler option and I just want to know why.
It is unlikely that you would be setting the stack size high enough to pose a problem for your users, unless you "go crazy" with it, but there is the possibility that you don't set it high enough and a stack error will happen. This is why I generally recommend /heap-arrays.
Just want to make sure that I understand your recommendation. You said that 'I generally recommend /heap arrays'. Does this mean that in general /heap arrays is better when you are not sure the size? If you 100% sure about temp array size, you may increase stack size only without losing the speed. Is this a true statement? One more question, canI do /heap arrays and increasing stack size at the same time? What will happen if I do this? Sorry that I don't totally understand stack and help size, so I am asking all these entry level questions.