delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/20/15:17:38

From: "Matthew Bennett" <bennett AT btinternet DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Large global arrays in C++
Date: 20 Nov 1997 19:05:04 GMT
Organization: BT Internet
Lines: 29
Message-ID: <01bcf5e7$b71098e0$533463c3@mrbcomp>
NNTP-Posting-Host: host5-99-52-83.btinternet.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi,

If I place a large array as a global value at the beginning of a C++
program, like:

....
#include <stdio.h>

int bigarray [100][100][100];
....

djgpp compiles it (after a while), and it runs ok, but the exe's size runs
into quite a few megabytes. This enormous size is simply unusable.

I know this is a known djgpp c++ bug, and it is apparently meant to be
fixed in the next version (gcc or gpp 2.8.0 or something). But two main
questions:

1) When *is* this next version meant to come out??
2) As large global arrays are needed for many games I'm writing, is there
any way I can get round this problem?? Surely others must have needed a
workaround too?

Thanks a lot for any help,

Matt

-- 
Computers do what you *tell* them to do, not what you *want* them to do.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019