too much global data defined in file 
Author Message
 too much global data defined in file

i have roughly 11 structures and 13 global variables.  I am getting
the error message "too much global data defined in file"  i would
paste the section of the program, but it's an aweful lot to paste.  is
it maybe to much data within the structures all together, or just too
many structures and global variables together?  all help is much
appreciated


Tue, 24 Aug 2004 01:55:38 GMT  
 too much global data defined in file

Quote:

> i have roughly 11 structures and 13 global variables.  I am getting
> the error message "too much global data defined in file"  i would
> paste the section of the program, but it's an aweful lot to paste.  is
> it maybe to much data within the structures all together, or just too
> many structures and global variables together?  all help is much
> appreciated

Do you have any big arrays?
--
"I hope, some day, to learn to read.
 It seems to be even harder than writing."
--Richard Heathfield


Tue, 24 Aug 2004 02:02:44 GMT  
 too much global data defined in file

Quote:
> i have roughly 11 structures and 13 global variables.  I am getting
> the error message "too much global data defined in file"  i would
> paste the section of the program, but it's an aweful lot to paste.  is
> it maybe to much data within the structures all together, or just too
> many structures and global variables together?  all help is much
> appreciated

A C implementation will necessarily provide a finite
amount of storage for each storage class ('auto',
'static', 'dynamic').

You've apparently exceed the limit for static storage.
As Ben says, check for large arrays.

Try to redesign things so that most of the data is
passed among functions as arguments, rather than
having them all work with 'centralized', global
data.

Another alternative is to dynamically allocate this
storage instead.  There will typically be more dynamic
storage available than static.

Also, your compiler might have configuration
options for controlling these storage space sizes.
Check your documentation.

Another alternative, is of course, a different compiler.

-Mike



Tue, 24 Aug 2004 04:29:40 GMT  
 too much global data defined in file

Quote:

> is
> it maybe to much data within the structures all together, or just too
> many structures and global variables together?

The most likely answer is that the combined total is to much.

--
== Eric Gorr ===== http://www.*-*-*.com/ :9293199 ===
"Therefore the considerations of the intelligent always include both
benefit and harm." - Sun Tzu
== Insults, like {*filter*}, are the last refuge of the incompetent... ===



Tue, 24 Aug 2004 04:34:25 GMT  
 too much global data defined in file

Quote:
> Do you have any big arrays?

I have my user structure that contains 73 variables
the others contain roughly 5 to 6 on the average


Tue, 24 Aug 2004 06:44:50 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Help on "Too much Global Data defined in File" error message.

2. Possible to use #define to define global variable?

3. Uninitialized global data (was Re: Global variables)

4. Q: Project Files & Global Data

5. Q: Project Files & Global Data

6. Too much global data in file error...

7. how can i define a large global structure as type far to bypass 64k limit

8. Defining global variables

9. More than one global threading model defined

10. Global vars, how to define them elegantly?

11. Global #defines and #pragmas?

12. how to define a global variable in VC

 

 
Powered by phpBB® Forum Software