May 06, 2024, 03:29:20 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Is local Istring limited?

Started by aurelCB, January 24, 2011, 10:32:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aurelCB

Hi...
I create local (in subrutine) ISTRING variable as:
ISTRING LongString[32766]
and recive warnig:
Warning: local data size 33628 bytes in subroutine ....
What's that mean ???
Is Istring type limited in size as local variable or i do something wrong?

all best...
Aurel

Brian

Aurel,

Have a look at the help file - Language > Subroutines. You will have to adjust the size
allowed for local variables in the Executable Options > Advanced section

You appear to be filling up the allowed space for local variables

Brian

aurelCB

January 24, 2011, 01:25:00 PM #2 Last Edit: January 24, 2011, 01:29:13 PM by aurelCB
Thanks Brian... ;)
I will see this...
by the way when i set local ISTRING with size of 16384 then there is no problem.
Probably you right.
but hmm...
I click advanced in Build option and there is :
Stack size : 1048576
Stack commit size : 32768

ok ,i will try few option

aurelCB

Hi people...
So what i must increase Stack size or Stack commit size?

Egil

According to the user manual you have to increase the stack commit size.

QuoteThe default stack commit size is set to 32K and indicates how large the size of the local variables in any one subroutine can be.  If you exceed this size the compiler will generate a warning message so you can adjust as needed.
Support Amateur Radio  -  Have a ham  for dinner!

Brian

The stack commit size is set to 32768 (32k). You had already assigned 32766 bytes in one definition. If you
have any more variable defs in there, you will need to add them to your large ISTRING value, then add a
bit more to be safe, and make that the new stack commit size

Brian

aurelCB


Brian

I suppose there can be no harm in doubling it - after all, 64k is small fry in memory
terms nowadays. And it will be released when the program finishes, anyway

Brian

aurelCB

Hi all... :)
I know that this topic is little bit old but problem is same...

Hmmm i increase stack comit size to 65536 and i still recive same warnings?
Is this normal ?
Or is better option that i use pointer insted of Istring?

any suggestion....

REDEBOLT

aurel,

Could you make your istring global?

I don't think global variables affect stack size.

Regards,
Bob

LarryMc

I do both:
I use
pointer= NEW(...and in one place(the visual designer)
I have a
global istring buffer[100000]because I was comfortable in doing it.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

aurelCB

Hi...
Yes i can use Istring as global..
Larry maby is better to use pointer ,ok i will try with pointer

thanks...