Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need system call that tells how much memory

Posted on 1999-01-04
5
Medium Priority
?
192 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 100 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

715 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