C
cman
Hi guys, why does this fail raising bad_alloc
int *v = new int [6000000000];
if this succeeds
int *v = (int *) malloc((unsigned)6000000000)
both on the same machine, same compiler g++, 64bit linux red hat
enterprise 4, no ulimits on the user, enough virtual memory ecc...
in both cases compiled with
g++ source.cpp -o executable
the file is always a c++ .cpp file, that line above is the only one that
differs.
Thanks
int *v = new int [6000000000];
if this succeeds
int *v = (int *) malloc((unsigned)6000000000)
both on the same machine, same compiler g++, 64bit linux red hat
enterprise 4, no ulimits on the user, enough virtual memory ecc...
in both cases compiled with
g++ source.cpp -o executable
the file is always a c++ .cpp file, that line above is the only one that
differs.
Thanks