public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Brian Dessent <brian@dessent.net>
To: gcc-help@gcc.gnu.org
Subject: Re: Determining Physical and Virtual Memory At Runtime In C
Date: Fri, 14 Apr 2006 17:11:00 -0000	[thread overview]
Message-ID: <443FD7D1.AC7E8081@dessent.net> (raw)
In-Reply-To: <20060414170545.17126.qmail@web33407.mail.mud.yahoo.com>

Jonathan Schreiter wrote:

> Thanks for the reply, but I'm looking for a way to
> programmatically determine the memory from inside the
> C program.  I suppose one could execute a shell
> statement and bring that data back in to C, but I'd
> like a simpler approach that does not rely on top.  Am
> I perhaps missing something?

You're asking on the wrong place.  This has nothing to do with gcc
itself.  It is target/platform specific.  On linux you can just open()
the appropriate file under /proc and read the values.  But that is not
going to be very portable.

Brian

      reply	other threads:[~2006-04-14 17:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-14 15:41 Jonathan Schreiter
2006-04-14 16:32 ` zippo
2006-04-14 17:05   ` Jonathan Schreiter
2006-04-14 17:11     ` Brian Dessent [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=443FD7D1.AC7E8081@dessent.net \
    --to=brian@dessent.net \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).