C Code - get system spec

Soldato
Joined
22 Oct 2005
Posts
2,883
Location
Moving...
Hi guys.

I've written an application and its nearing its final stages. One of the things I want to add is a sort of performance checker, i.e. before running the program it will get some system information and set some variables relating to the performance accordingly. So if the system had only 256MB ram it wouldn't load as much data.

Is there any C functions/library where I can retreive such data? It only needs to be very basic, e.g processor speed, amount of ram installed, graphics card size (this is most important as its a graphics based program).

Thanks for any advice.
 
Thats the style I'm after, but not quite the data I'm after. Ideally I would like:

- Processor speed
- No. of cores (found)
- Total Ram installed (or available ram)
- Graphics card size e.g. 256MB (core and mem speeds would be an added bonus)

Thanks again.
 
Well I've used the processor speed code from the link Shadez provided, it looks to me like some kind of benchmark but it gets it spot on for my system and doesn't take long to run so that fine.

And you're right, RAM isn't actually that important, but it would be nice to know the maximum space I can allocate before running the program rather than failing halfway through it.

It's really the graphics card data that is most important to me because it's so graphics intensive.

Thanks again for all your swift replies.


**edit** - I've got the memory sorted using GlobalMemoryStatusEx, it's just the graphics card info now
 
Last edited:
Back
Top Bottom