void testMemory(){
QMap<long , int> distances;
for(long x=0; x<2073600; x++){
distances.insert(x, 2);
}
distances.clear();
}
void testMemory(){
QMap<long , int> distances;
for(long x=0; x<2073600; x++){
distances.insert(x, 2);
}
distances.clear();
}
To copy to clipboard, switch view to plain text mode
...
#define DIV 1024
#define WIDTH 7
...
MEMORYSTATUSEX statex;
statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx (&statex);
printf ("There is %*ld percent of memory in use.\n", WIDTH, statex.dwMemoryLoad);
printf ("There are %*I64d total Kbytes of physical memory.\n", WIDTH, statex.ullTotalPhys/DIV);
printf ("There are %*I64d free Kbytes of physical memory.\n", WIDTH, statex.ullAvailPhys/DIV);
printf ("There are %*I64d total Kbytes of paging file.\n", WIDTH, statex.ullTotalPageFile/DIV);
printf ("There are %*I64d free Kbytes of paging file.\n", WIDTH, statex.ullAvailPageFile/DIV);
printf ("There are %*I64d total Kbytes of virtual memory.\n", WIDTH, statex.ullTotalVirtual/DIV);
printf ("There are %*I64d free Kbytes of virtual memory.\n", WIDTH, statex.ullAvailVirtual/DIV);
cout << endl << "Call testMem function..." << endl << endl;
testMemory();
statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx (&statex);
printf ("There is %*ld percent of memory in use.\n", WIDTH, statex.dwMemoryLoad);
printf ("There are %*I64d total Kbytes of physical memory.\n", WIDTH, statex.ullTotalPhys/DIV);
printf ("There are %*I64d free Kbytes of physical memory.\n", WIDTH, statex.ullAvailPhys/DIV);
printf ("There are %*I64d total Kbytes of paging file.\n", WIDTH, statex.ullTotalPageFile/DIV);
printf ("There are %*I64d free Kbytes of paging file.\n", WIDTH, statex.ullAvailPageFile/DIV);
printf ("There are %*I64d total Kbytes of virtual memory.\n", WIDTH, statex.ullTotalVirtual/DIV);
printf ("There are %*I64d free Kbytes of virtual memory.\n", WIDTH, statex.ullAvailVirtual/DIV);
...
...
#define DIV 1024
#define WIDTH 7
...
MEMORYSTATUSEX statex;
statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx (&statex);
printf ("There is %*ld percent of memory in use.\n", WIDTH, statex.dwMemoryLoad);
printf ("There are %*I64d total Kbytes of physical memory.\n", WIDTH, statex.ullTotalPhys/DIV);
printf ("There are %*I64d free Kbytes of physical memory.\n", WIDTH, statex.ullAvailPhys/DIV);
printf ("There are %*I64d total Kbytes of paging file.\n", WIDTH, statex.ullTotalPageFile/DIV);
printf ("There are %*I64d free Kbytes of paging file.\n", WIDTH, statex.ullAvailPageFile/DIV);
printf ("There are %*I64d total Kbytes of virtual memory.\n", WIDTH, statex.ullTotalVirtual/DIV);
printf ("There are %*I64d free Kbytes of virtual memory.\n", WIDTH, statex.ullAvailVirtual/DIV);
cout << endl << "Call testMem function..." << endl << endl;
testMemory();
statex.dwLength = sizeof (statex);
GlobalMemoryStatusEx (&statex);
printf ("There is %*ld percent of memory in use.\n", WIDTH, statex.dwMemoryLoad);
printf ("There are %*I64d total Kbytes of physical memory.\n", WIDTH, statex.ullTotalPhys/DIV);
printf ("There are %*I64d free Kbytes of physical memory.\n", WIDTH, statex.ullAvailPhys/DIV);
printf ("There are %*I64d total Kbytes of paging file.\n", WIDTH, statex.ullTotalPageFile/DIV);
printf ("There are %*I64d free Kbytes of paging file.\n", WIDTH, statex.ullAvailPageFile/DIV);
printf ("There are %*I64d total Kbytes of virtual memory.\n", WIDTH, statex.ullTotalVirtual/DIV);
printf ("There are %*I64d free Kbytes of virtual memory.\n", WIDTH, statex.ullAvailVirtual/DIV);
...
To copy to clipboard, switch view to plain text mode
There is 59 percent of memory in use.
There are 2095848 total Kbytes of physical memory.
There are 843764 free Kbytes of physical memory.
There are 4037636 total Kbytes of paging file.
There are 2799952 free Kbytes of paging file.
There are 2097024 total Kbytes of virtual memory.
There are 2062472 free Kbytes of virtual memory.
Call testMem function...
There is 59 percent of memory in use.
There are 2095848 total Kbytes of physical memory.
There are 845320 free Kbytes of physical memory.
There are 4037636 total Kbytes of paging file.
There are 2799572 free Kbytes of paging file.
There are 2097024 total Kbytes of virtual memory.
There are 1801284 free Kbytes of virtual memory.
There is 59 percent of memory in use.
There are 2095848 total Kbytes of physical memory.
There are 843764 free Kbytes of physical memory.
There are 4037636 total Kbytes of paging file.
There are 2799952 free Kbytes of paging file.
There are 2097024 total Kbytes of virtual memory.
There are 2062472 free Kbytes of virtual memory.
Call testMem function...
There is 59 percent of memory in use.
There are 2095848 total Kbytes of physical memory.
There are 845320 free Kbytes of physical memory.
There are 4037636 total Kbytes of paging file.
There are 2799572 free Kbytes of paging file.
There are 2097024 total Kbytes of virtual memory.
There are 1801284 free Kbytes of virtual memory.
To copy to clipboard, switch view to plain text mode
Bookmarks