RE: [GD-Windows] How to determine total physical memory available ?
Brought to you by:
vexxed72
From: Carsten O. <car...@se...> - 2004-01-26 20:08:29
|
IIRC, GlobalMemoryStatus returns the actual amount of RAM minus the DOS-inherited 640 kB base memory. After actually checking that: Yep, add 640 kB (=3D655360 byte) to the value in xMS.dwTotalPhys and you got the real value. When doing anything of this kind, please consider using = GlobalMemoryStatusEx on Win2k/XP systems. We're not that far from systems having the full 4GB space equipped. Carsten Orthbandt Founder + Development Director SEK SpieleEntwicklungsKombinat GmbH http://www.sek-ost.de Wenn ich Visionen habe, gehe ich zum Arzt. - Helmut Schmidt =20 > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of Yannick Letourneau > Sent: Monday, January 26, 2004 8:47 PM > To: gam...@li... > Subject: [GD-Windows] How to determine total physical memory=20 > available ? >=20 >=20 > I need to determine how much memory is installed on the user's system > somehow. >=20 > I used GlobalMemoryStatus but the values returned in the=20 > member dwTotalPhys > is always underestimating a bit. For example on my dev=20 > machine it returns > 1022 MB although I have 1024 MB installed. Same thing happens on all > systems I've tested. >=20 > Same thing is reported in dxdiag.exe so they seem to use that=20 > function as > well. >=20 > However, when I use the System Information tool in the system tools of > Windows, it correctly reports 1024 MB. >=20 > So anyone knows how I can get the exact information ? >=20 > Yannick L=E9tourneau > UBISOFT >=20 >=20 >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU5 >=20 |