Re: Determining Physical and Virtual Memory At Runtime In C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux