How to find the amount of memory

This is a discussion on How to find the amount of memory within the C Programming forums, part of the General Programming Boards category; ->How can I find out how much memory is available?...

  1. #1
    Prakash
    Guest

    Lightbulb How to find the amount of memory

    ->How can I find out how much memory is available?

  2. #2
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    well this is for windows only but
    Code:
    
    #include<windows.h>
    
    int main(void)
    {
        MEMORYSTATUS memstat;
        GlobalMemoryStatus(&memstat);
        printf("%d",memstat.dwAvailPhys);
        return 0;
    }
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 02-06-2009, 12:27 PM
  2. Memory allocation/reallocation
    By magda3227 in forum C Programming
    Replies: 10
    Last Post: 07-04-2008, 04:27 PM
  3. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 08:54 AM
  4. Program that displays amount of free memory
    By trancedeejay in forum Linux Programming
    Replies: 3
    Last Post: 01-13-2006, 01:27 PM
  5. Memory handler
    By Dr. Bebop in forum C Programming
    Replies: 7
    Last Post: 09-15-2002, 05:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21