[CMake] CMake 2.6.0 RC 10 ready for testing

Bill Hoffman bill.hoffman at kitware.com
Fri May 2 12:57:01 EDT 2008


Stefan wrote:
> Hi Bill,
> 
> it works, thanks!
> 
> To the Memory Problem. I tried this:
> 
> 	MEMORYSTATUSEX ms;
> 	ms.dwLength = sizeof (ms); //<- If you don't do this, the values
> will be wrong!
> 	GlobalMemoryStatusEx(&ms); // Use this instead of
> GlobalMemoryStatus()
> 
> 	unsigned __int64 tv = ms.ullTotalVirtual;
> 	unsigned __int64 tp = ms.ullTotalPhys;
> 	unsigned __int64 av = ms.ullAvailVirtual;
> 	unsigned __int64 ap = ms.ullAvailPhys;
> 
> 	unsigned long TotalVirtualMemory = (unsigned long)tv>>10>>10;
> 	unsigned long TotalPhysicalMemory = (unsigned long)tp>>10>>10;
> 	unsigned long AvailableVirtualMemory = (unsigned long)av>>10>>10;
> 	unsigned long AvailablePhysicalMemory = (unsigned long)ap>>10>>10;
> 

Yup, after I posted I found the Ex function, and have made a commit.

-Bill


More information about the CMake mailing list