Solved

Need system call that tells how much memory

Posted on 1999-01-04
5
189 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

820 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