How to retrieve total amount of system RAM?

Benji Smith dlanguage at benjismith.net
Wed Aug 13 14:04:10 PDT 2008


Steven Schveighoffer wrote:
> Usually, the non-EX versions of MS functions work fine on the newer 
> platforms, they are just not preferred.
> 
> Unless, of course, there is some resolution issue :)
> 
> In that case, you can call the GetVersion function. 
> http://msdn.microsoft.com/en-us/library/ms724439.aspx
> 
> -Steve 

Well, there's this litle tidbit:

"On computers with more than 4 GB of memory, the MEMORYSTATUS structure 
can return incorrect information, reporting a value of –1 to indicate an 
overflow. If your application is at risk for this behavior, use the 
GlobalMemoryStatusEx function instead of the GlobalMemoryStatus function."

http://msdn.microsoft.com/en-us/library/aa366772(VS.85).aspx

--benji


More information about the Digitalmars-d-learn mailing list