I'm working on a computer with Windows 7 and use Visual C++ Express. The computer has 4 G memory.
I'm doing a simulation study at the university and need to store large amount of data. I want to store the data in the memory so I can get a fast simulationprocess. If I store the data as an array, " int data [D]", I can use max D=250,000. If I store the data as " vector <int> data; data.reserve(D)", I can use max D=390,000,000. I've noticed that the computer works much faster with arrays than vectors.
Why can I only use D=250,000 with "int data[D]"? Can I somehow change the code so I can allocate more memory with arrays?