I'm currently writing a program that uses several large arrays to store data. It's important that the data is quickly accessible throughout the program, but I need to store a lot of it.

The problem is, if I try to allocate more than about 500000 memory slots, the program crashes when I run it. What is the reason for this? My program only uses about 500 kB of memory when it is just small enough to run. Is there a trick to allocating large chunks of memory? I have tried writing programs that do nothing but declare arrays, and they still crash when I allocate around 500000 slots.

To edit and compile my code I use Dev-C++ on a Windows 2000 machine.

Thanks.
XuRumin