Solved

Need system call that tells how much memory

Posted on 1999-01-04
5
185 Views
Last Modified: 2010-04-15
NT 4.0; Visual C/C++ -----

Is there a system call that tells me how much memory is installed/available?  I'm looking for the most straight-forward, easy to use function.  I'm trying to avoid having to 'walk the heap", calculating for myself.

thx.
0
Comment
Question by:msaccess
  • 3
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 50 total points
ID: 1255550
You can use GlobalMemoryStatus/GetFreeSpace functions.
0
 

Author Comment

by:msaccess
ID: 1255551
Does this require compiling with MFC or any other special libraries?  I should have mentioned that my application is a vanilla C program.  It does not and ideally will not need to link to anything other than the base C language stuff?

thx.
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 1255552
No, not must MFC or OWL. It is pure Windows API
0
 

Author Comment

by:msaccess
ID: 1255553
but it is windows, so I'll need to link in all that stuff -- which I don't want to do.  Is there a system call that is part of the base os?
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 1255554
In dos you can use coreleft()/farcoreleft() functions.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now