Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-30-2004, 08:32 PM   #1
LQ Newbie
Registered: Oct 2004
Posts: 1

Rep: Reputation: 0
get Physical memory in C/C++

Hi all,

I'm searching for a set of functions in C (or objects in C++) that returns the total and the available physical memory.

Does exists a STANDARD way, so that I can use the code also under Windows?

Bye and thanks!
Old 10-30-2004, 08:54 PM   #2
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
I don't know about any portable way, but in linux you can cat /proc/meminfo.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
free physical memory saavik Solaris / OpenSolaris 7 08-26-2005 12:22 PM
Less physical memory? ariek Debian 5 07-21-2005 02:23 PM
How to access physical memory in C? cyu021 Programming 6 03-27-2005 04:16 AM
how to use swap more than the physical memory Santosh_d Linux - General 9 03-24-2004 02:51 PM
How Much Physical Memory ? tied2 Linux - Newbie 3 06-17-2002 01:30 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration