MrWizard6600
Supreme [H]ardness
- Joined
- Jan 15, 2006
- Messages
- 5,791
I'm writing a program that includes a few dozen sorting algorithms, and to get some good data I started off with an array initialized to 100,000 floats long. I then changed it to 1,000,000 too see just how fast quicksort really was. Problem is, I got a general (read: you really screwed the pooch this time Mr programmer) runtime error. I was scratching my head thinking that there had to be a memory access violation somewhere. I ran through my code for a few minutes before finally finally changing the array size back to 100,000. Low and behold no run time error.
I'm wondering if there's some simple way to get:
using namespace std;
const int LIST_SIZE = 1000000;
int main(){
float list[LIST_SIZE];
//...
}
to run without this runtime error... without initializing 10 arrays of size 100,000.
(or... hell if i could and just bit-twiddle em so that they're back to back to back that would be ok...)
Presumably its windows memory management which is shutting me down on account of trying to access more than a few megs of memory (32bits @ 1,000,000 elements long is 8 megs). Is there any way I can get the man to stop shutting me down?
system("GOAWAY")?
I'm wondering if there's some simple way to get:
using namespace std;
const int LIST_SIZE = 1000000;
int main(){
float list[LIST_SIZE];
//...
}
to run without this runtime error... without initializing 10 arrays of size 100,000.
(or... hell if i could and just bit-twiddle em so that they're back to back to back that would be ok...)
Presumably its windows memory management which is shutting me down on account of trying to access more than a few megs of memory (32bits @ 1,000,000 elements long is 8 megs). Is there any way I can get the man to stop shutting me down?
system("GOAWAY")?