Thread: RAM size!?

  1. #1
    Registered User
    Join Date
    Dec 2005

    Question RAM size!?

    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!


  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    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.

  3. #3
    pwns nooblars
    Join Date
    Oct 2005
    Portland, Or

    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.

  4. #4
    Registered User
    Join Date
    Dec 2005
    I'm on 32bit WinXP with Borland C++ Builder...

  5. #5
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Generic heapsort
    By Sephiroth1109 in forum C Programming
    Replies: 15
    Last Post: 12-07-2007, 06:14 PM
  2. Invalid conversion from 'void*' to 'BYTE' help
    By bikr692002 in forum C++ Programming
    Replies: 9
    Last Post: 02-22-2006, 11:27 AM
  3. An exercise in optimization
    By Prelude in forum Contests Board
    Replies: 10
    Last Post: 04-29-2005, 03:06 PM
  4. RAM how do i know?
    By Boomba in forum Tech Board
    Replies: 5
    Last Post: 06-18-2003, 08:17 PM