I am not sure how I could give you information about the following error. The code is too long to put here. The program make a large double array of size N.M.d and then work on M.d arrays for each (i=1; i<N; ++i) without declaring new variables or arrays on each step.
I ran program with N=10, M=10^6, and d=3 it works. But for M=2.10^6, VS gives me the following error message:
1 2 3
First-chance exception at 0x77C44B32 in free.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0033F01C.
If there is a handler forthis exception, the program may be safely continued.
When I monitor my usage memory from windows task manager, I have still lots of memory (4GB). I shouldn't run out of it. But, the program stops giving the following error.
The gdb for g++ gives me the following error message:
1 2 3 4 5 6 7
1 [main] free 2648 exception::handle: Exception: STATUS_ACCESS_VIOLATION
1423 [main] free 2648 open_stackdumpfile: Dumping stack trace to free.exe.stackdump
Program received signal SIGSEGV, Segmentation fault.
pthread_mutex::pthread_mutex (this=0x40010006, attr=0x0)
at /usr/src/debug/cygwin-1.7.17-1/winsup/cygwin/thread.cc:1705
1705 pshared (PTHREAD_PROCESS_PRIVATE)
I wonder what's happening here? How can I give you more info about the issue?
So, there is no way a PC can run a program which needs to use large memory, no matter how much memory is installed on your computer?
That sounds f**king stupid.
I found this address and changed the paging file limit to 7GB. I made a test problem which makes a array of large size. As soon as it uses 3GB of memory, I get the same error. Is that any way I can use more than this from my memory. All my 8GB memory is installed on one slot.
With Visual Studio 2012 Express, I do compile on terminal, i.e. on command line. I have to load environment variables with a batch file. With appropriate parameter, it sets up the 32-bit compiler binary to produce 64-bit binaries.
IDE ... probably has the option somewhere, but I don't use IDE. Search the MS VS documentation (and the web).
With Visual Studio 2012 Express, I do compile on terminal, i.e. on command line. I have to load environment variables with a batch file. With appropriate parameter, it sets up the 32-bit compiler binary to produce 64-bit binaries.
Can you send me a link to learn how to compile it as 64bit on the terminal?