On Aug 7, 2006, at 1:08 PM, Thomas Moore wrote:

Now I can understand that the compiler would put the 1024 constants defined in the method on the stack, but that should only take up 4K of space.

Well, perhaps: but in real life it's always more complicated than that. There is no optimizer, so generated code is sometimes rather less clever than one might expect.

So there must have been a change somewhere (between 2006r1 and 2006r2?) where the compiler now puts much more information on the stack, (32 bytes per iteration instead of the expected 4 bytes). Mars, is that correct?

Not exactly. This method has most likely been close to the limit all along.

Since it is not really logical to "refactor" this particular method, is there a way that I can reduce the overhead in the method so that it does not use up so much stack space per iteration?

Why is it necessary to store this data in code? Seems to me a better approach would be to put the list of constants in some external file and drop it into your project, effectively making a big constant, which you can then load up as an array.

Mars Saxman
REAL Software

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to