On 15-May-07, at 11:47 PM, Peter K. Stys wrote:

> In a global module, I declared a structure with a few fields, one  
> of which is:
>
> realData(16000) as single
>
> When I compile I get 2 errors:

What RB version ? What are you building for (OS X PEF , UB, Windows) ?
I'm able to use a line like this in 2005r4, 2006r4, 2007r1 and 2007r2  
without a compile error.
And able to put it in a structure as well without complaint so I  
suspect I may not be duplicating your usage precisely.

> 1) In my global.wtrkWave Declaration itself: "This method uses 125K of
> stack space but the limit is 32K"
>
> 2) And in a function that declares a variable of type wtrkWave (as a
> structure), I get the same error.
>
> First of all, how can a declaration (#1) use any stack space at all.

In order to set aside 16000 singles that requires some stack space  
and the compiler can figure out how much is required at run time and  
complain
But, a lot of stuff does not go on the stack.
I don't recall if the entire contents of the array do, or just a  
reference does. a Reference would only be very small (like 4 byes or  
something)

> Second, my structure is 64K (16K singles give or take) not 125K

Any other big locals arrays of big structures ?

> third what's with the 32K limit on stack space anyway (in the days  
> of the
> Motorola 68000 chip I can understand that stacks were limited to 32K
> on these 16 bit CPUs, but I have 2.5 GB RAM on my machine now and I
> can't use more that 32K of stack???!!!!).

That one I dont know the details of
I do know lots of things that in other languages that do go on the  
stack do not go on the stack in RB as they are just object references  
and not the entire structure on the stack

> What is going on here and how do I get around this?  Having an  
> array of 16K singles is not asking for much.

Depends on the version apparently
There was an issue in older versions that definitely limited this but  
I believe this has changed

If you can get Mars to answer this directly I think he can give you a  
better idea what IS put on the stack


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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to