CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010
    Posts
    53

    RAM memory consumption

    I'm implementing an application that should decide whether to move computations
    to external memory, depending on RAM memory consumption. Is there a C++ function that computes my maximal RAM memory capacity, and the amount of currently consumed portion (in MB, perhaps). Any other suggestions on how to obtain these values are welcome.
    Thanks

  2. #2
    Join Date
    Jan 2009
    Posts
    1,689

    Re: RAM memory consumption

    This would be certainly be platform specific, so no. I'm sure gtk, win32, and cocoa all have functions for it, but they're all going to be different.

  3. #3
    Join Date
    Nov 2006
    Location
    Essen, Germany
    Posts
    1,344

    Re: RAM memory consumption

    If you´re targetting Windows there are two API functions GlobalMemory/GlobalMemoryEx that return the system´s memory statistics.
    - Guido

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured