RE: [GD-Windows] How to determine total physical memory available ?
Brought to you by:
vexxed72
From: Simon O'C. <si...@sc...> - 2004-01-27 00:37:39
|
Although I've not tried it myself, WMI (assuming 2K/XP) seems to have a = few things for getting lots of information about the hardware - not sure how much of that info is available on all systems though - I'll give it a = try when I get a free moment - there's a lot of very intriguing stuff you = can query in there such as: "Win32_PhysicalMemoryArray" "Win32_PhysicalMemoryLocation" "Win32_PhysicalMemory" Which seem to have stuff as hardcore as the chip package type, speed in = ns, chip manufacturer, bank layout. 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 21:15 > To: gam...@li... > Subject: RE: [GD-Windows] How to determine total physical=20 > memory available ? >=20 > Both ;-) >=20 > Yeah, right now I'm doing as you're suggesting but I still=20 > would like to display the right value to the user. I guess=20 > I'll have to live with it unless I find a better way. >=20 > Yannick >=20 > -----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=20 > memory available ? >=20 >=20 >=20 > BTW: >=20 > Do you actually need the value for presentation to the user? >=20 > Or is this to determine whether the user has enough physical=20 > memory to run your game or use advanced memory hungry features? >=20 >=20 > If it's the latter, then you should only really use the value=20 > as a rough guide (much the same as with total video memory), e.g.: >=20 > if (memorysize < 500000000) > { > alert( "sorry this game requires a minimum of 512MB" ); > return; > } >=20 > m_enableMemoryHoggingFeature =3D false; >=20 > if (memorysize >=3D 1000000000) > { > m_enableMemoryHoggingFeature =3D true; > } >=20 >=20 > Of course, you can never assume all of that physical memory=20 > is yours to play with anyway (kernel allocations, AGP=20 > reservation etc). >=20 >=20 > Simon O'Connor > Programmer @ Acclaim > & Microsoft DirectX MVP=20 >=20 > > -----Original Message----- > > From: gam...@li... > > [mailto:gam...@li...]=20 > On Behalf Of=20 > > Yannick Letourneau > > Sent: 26 January 2004 20:21 > > To: gam...@li... > > Subject: RE: [GD-Windows] How to determine total physical memory=20 > > available ? > >=20 > > Actually it would be a little more complicated since memory=20 > can be a=20 > > sum of different power of 2 (for example if you have one=20 > memory chip=20 > > of 128 MB and another of 64 MB totaling 192MB which is not power of=20 > > 2). > >=20 > > I'd rather not make this kind of assumption myself and let=20 > the system=20 > > 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 memory=20 > > available ? > >=20 > >=20 > > I guess System Information tool just rounds this number to the next=20 > > "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=20 > memory available=20 > > ? > >=20 > > I need to determine how much memory is installed on the=20 > user's system=20 > > somehow. > >=20 > > I used GlobalMemoryStatus but the values returned in the member=20 > > 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=20 > happens on all=20 > > systems I've tested. > >=20 > > Same thing is reported in dxdiag.exe so they seem to use=20 > that function=20 > > as well. > >=20 > > However, when I use the System Information tool in the=20 > system tools of=20 > > 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=20 > > on Open Tools Development and Integration See the breadth=20 > of Eclipse=20 > > 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=20 > > on Open Tools Development and Integration See the breadth=20 > of Eclipse=20 > > 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=20 > > on Open Tools Development and Integration See the breadth=20 > of Eclipse=20 > > 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 >=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 >=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 |