I have Vista 64 Ultimate and installed the latest Qt SDK, 2009.03. I seem to be hitting memory limits when using malloc() even though I have 8GB of physical RAM, and task manager shows only 2GB of it is used. My program crashes when I try to allocate large amounts of memory.

The exact limit seems to vary, but it seems to be about 1.74GB. The following code causes my program to crash:
Qt Code:
  1. #include <iostream>
  2. #include <qglobal.h>
  3.  
  4. using namespace std;
  5.  
  6. int main(int argc, char *argv[]){
  7. double* test = (double*) malloc(1863000000);
  8. cout<<"Test"<<endl;
  9. test[0] = 1.0;
  10. }
To copy to clipboard, switch view to plain text mode 
With a slightly smaller number the program executes properly. I don't think Vista Ultimate has a memory limit for processes. Is the latest Qt compiler 64-bit?

How can I utilize my RAM to its fullest extent using malloc() and Qt?