Hi there!
I've been searching a while with google and found nothing interesting about it... My program needs to know how much RAM memory there is on the system it's running on.
I'd like some help on this, please!
Thanks
Max
Hi there!
I've been searching a while with google and found nothing interesting about it... My program needs to know how much RAM memory there is on the system it's running on.
I'd like some help on this, please!
Thanks
Max
Start by mentioning which OS and compiler you're using, there is no standard answer.
> My program needs to know how much RAM memory there is...
Why does it "need" to know?
If your program is running on a 32-bit OS, there is only a passing resemblance between the amount of physical RAM in your machine and the amount of virtual memory the OS will give to your program.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
http://msdn.microsoft.com/library/de...moryStatus.asp
First thing from "Dectecting the amount of memory on a system C++" on google gave me a post saying to look at that fuction. Since you can't really use more ram that what is available, without destablizing other programs, this function should be good enough.
I'm on 32bit WinXP with Borland C++ Builder...
Windows API should has a function to get system info.
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C