RE: [GD-Windows] How to determine total physical memory available ?
Brought to you by:
vexxed72
From: Yannick L. <yle...@ub...> - 2004-01-26 21:15:01
|
Both ;-) Yeah, right now I'm doing as you're suggesting but I still would like = to display the right value to the user. I guess I'll have to live with it unless I find a better way. Yannick -----Original Message----- From: Simon O'Connor [mailto:si...@sc...] Sent: Monday, January 26, 2004 4:07 PM To: gam...@li... Subject: RE: [GD-Windows] How to determine total physical memory available ? BTW: Do you actually need the value for presentation to the user? Or is this to determine whether the user has enough physical memory to = run your game or use advanced memory hungry features? If it's the latter, then you should only really use the value as a = rough guide (much the same as with total video memory), e.g.: if (memorysize < 500000000) { alert( "sorry this game requires a minimum of 512MB" ); return; } m_enableMemoryHoggingFeature =3D false; if (memorysize >=3D 1000000000) { m_enableMemoryHoggingFeature =3D true; } Of course, you can never assume all of that physical memory is yours to = play with anyway (kernel allocations, AGP reservation etc). Simon O'Connor Programmer @ Acclaim & Microsoft DirectX MVP=20 > -----Original Message----- > From: gam...@li...=20 > [mailto:gam...@li...] On=20 > Behalf Of Yannick Letourneau > Sent: 26 January 2004 20:21 > To: gam...@li... > Subject: RE: [GD-Windows] How to determine total physical=20 > memory available ? >=20 > Actually it would be a little more complicated since memory=20 > can be a sum of different power of 2 (for example if you have=20 > one memory chip of 128 MB and another of 64 MB totaling 192MB=20 > which is not power of 2). >=20 > I'd rather not make this kind of assumption myself and let=20 > the system give me the exact numbers ;-) >=20 > -----Original Message----- > From: Timur Davidenko [mailto:ti...@cr...] > Sent: Monday, January 26, 2004 3:16 PM > To: gam...@li... > Subject: RE: [GD-Windows] How to determine total physical=20 > memory available ? >=20 >=20 > I guess System Information tool just rounds this number to=20 > the next "reasonable" number. > It knows that memory chips don't come in 1022Mb setups.. > So it`s quite easy to round number you get to closest power of 2.. >=20 > _____________________ > Timur Davidenko. > Crytek (http://www.crytek.com) >=20 > -----Original Message----- > From: Yannick Letourneau [mailto:yle...@ub...] > Sent: Monday, January 26, 2004 8:47 PM > To: gam...@li... > Subject: [GD-Windows] How to determine total physical memory=20 > available ? >=20 > I need to determine how much memory is installed on the=20 > user's system somehow. >=20 > I used GlobalMemoryStatus but the values returned in the=20 > member dwTotalPhys is always underestimating a bit. For=20 > example on my dev machine it returns > 1022 MB although I have 1024 MB installed. Same thing=20 > 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=20 > 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=20 > Conference on Open Tools Development and Integration See the=20 > 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 >=20 >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 Premiere=20 > Conference on Open Tools Development and Integration See the=20 > 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 >=20 > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 Premiere=20 > Conference on Open Tools Development and Integration See the=20 > 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 > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004 > =20 >=20 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004 =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 |