IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Bruce Peaslee on December 21, 2005, 11:17:01 AM

Title: Data size warning
Post by: Bruce Peaslee on December 21, 2005, 11:17:01 AM
I'm fooling arround with an array of a structure. If the array is given 2 elements, the program works as expected; but if I give it 200 elements, I get:

"Warning: local data size 766400 bytes in subroutine 'main' ".  It doesn't run.

(If I pursue this propject, I will probably use linked lists.)
Title: Re: Data size warning
Post by: Parker on December 21, 2005, 01:23:20 PM
That means you've exceeded the allocated stack size, which is not a good idea to do. I wrote some functions for using linked lists, see here:

http://www.ionicwind.com/forums/index.php?topic=39.0

Once operator overloading is supported we can write a class that uses linked lists as if they were arrays.
Title: Re: Data size warning
Post by: Zen on December 21, 2005, 01:43:46 PM
Hey using linked lists like arrays sounds cool.

Lewis
Title: Re: Data size warning
Post by: Ionic Wind Support Team on December 21, 2005, 07:41:58 PM
And you can increase your stack size in the 'Advanced' tab of the executable options dialog.
Title: Re: Data size warning
Post by: Zen on December 21, 2005, 08:56:08 PM
Ive never once changed the default stack size. I im not sure what it does. I know that it is basicly how much memory is allocated to your application but appart from that...

Lewis
Title: Re: Data size warning
Post by: Parker on December 21, 2005, 09:03:10 PM
If you learn a little about assembly, you'll learn about the "stack" which stores local variables in subroutines, parameters, and can be used for other stuff. It has a limit though, which is set by the linker. Personally, I think if you have that much data in a subroutine, maybe it's time to think about some other types of structures though.
Title: Re: Data size warning
Post by: Zen on December 21, 2005, 09:06:39 PM
Hmm well ive not had that trouble so ive not had to look into it. Learning assembley code is something else i would like to look into when i have time.

I did a little at university, programming Z80 processors. Was fun until you made a mistake and you had to reset the whole thing. But i dont remember much of that, it was only a short course.

Lewis
Title: Re: Data size warning
Post by: Parker on December 21, 2005, 09:46:30 PM
I've started reading the ebook that Paul recommends, combined with random findings, and I'm learning a lot. It's really a good thing to know, especially if you're going to write a compiler eventually.