This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Array size problem


On Mon, 19 Jul 2004 11:08:50 +1000
Sisyphus <kalinabears@iinet.net.au> wrote:

> Joachim Matussek wrote:
> > Hello,
> > 
> > when i try to declare a big float array within a function my program crashed. Smaller arrays work well.
> > 
> > Example:
> > 
> > float array[70000][100];
> > 
> > MinGW-3.1.0-1
> > Windows 2000 Prof SP4
> > 
> 
> For me that produces an "unknown software exception" at runtime. The 
> same happens if you use the Visual Studio compiler.
> I assume it occurs when you request more memory than is available. On my 
> Win2000 box I can declare an array size of up to 520764 floats/longs 
> (and 4 times as many chars) before the error arises.
> 
> Cheers,
> Rob
> 
> 
> -- 
> Any emails containing attachments will be deleted from my ISP's mail 
> server before I even get to see them. If you wish to email me an 
> attachment, please provide advance warning so that I can make the 
> necessary arrangements.
> 
Hi there!

Probably it is unavaiable such a big continous memory area, try to solve this with aray with pointers to smaller areas. Could you mail me a source code, i'll try this on WinXP box(i have one @ work).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]