How can I figure out how much ram a computer has using C++?
Alternatively, if you know a way to do the same in php, that would be helpful.
Getting a computer's ram amount in C++?
Moderator: General Moderators
There's no such standard function/method or standard library for c++, nothing like http://java.sun.com/j2se/1.4.2/docs/api ... axMemory() (and even that's "only" the jvm limit, not necessarily the "real" value).
For win32 there is e.g. GlobalMemoryStatus.
On linux you might read /proc/meminfo or use free -m
What are you trying to achieve?
For win32 there is e.g. GlobalMemoryStatus.
On linux you might read /proc/meminfo or use free -m
What are you trying to achieve?
I'm trying to do the same thing I'm doing in this topic, but more natively: viewtopic.php?t=66255&start=0&postdays= ... highlight=
In that topic I'm reading a report generated by CPU-Z. I want to make my own program that can get a few of the basic things CPU-Z can. This is on Windows. CPU-Z However, don't think that I don't want help in that other topic...that is still a viable option for this, and the CPU-Z has many specific things I'm sure I couldn't find out with a simple program.
In that topic I'm reading a report generated by CPU-Z. I want to make my own program that can get a few of the basic things CPU-Z can. This is on Windows. CPU-Z However, don't think that I don't want help in that other topic...that is still a viable option for this, and the CPU-Z has many specific things I'm sure I couldn't find out with a simple program.
Well then the example at the manual page for GlobalMemoryStatus should help you.