Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Free/total RAM?

Free/total RAM?

Scheduled Pinned Locked Moved C / C++ / MFC
jsonperformancequestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dontknowitall
    wrote on last edited by
    #1

    Is there a Win32 API I can call to get the total physical RAM of the computer? It would also be nice to get "Available physical memory" as well, but that's not really a huge concern. But it probably involves using some awful API like WMI or PDH.

    RaviBeeR 1 Reply Last reply
    0
    • D dontknowitall

      Is there a Win32 API I can call to get the total physical RAM of the computer? It would also be nice to get "Available physical memory" as well, but that's not really a huge concern. But it probably involves using some awful API like WMI or PDH.

      RaviBeeR Offline
      RaviBeeR Offline
      RaviBee
      wrote on last edited by
      #2

      See GlobalMemoryStatusEx()[^]. /ravi

      This is your brain on Celcius Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

      D 1 Reply Last reply
      0
      • RaviBeeR RaviBee

        See GlobalMemoryStatusEx()[^]. /ravi

        This is your brain on Celcius Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com

        D Offline
        D Offline
        dontknowitall
        wrote on last edited by
        #3

        Brilliant. I knew it had to be simple. I think I'll use both GlobalMemoryStatusEx() and GlobalMemoryStatus() to make sure I handle all Windows platforms cleanly.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups