Re: Determining the memory used by a dynamically loaded shared object

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

 



Ian Lance Taylor wrote:
David Daney <ddaney@xxxxxxxxxxxxxxxxxx> writes:

Marcus Clyne wrote:
Hi David,

Thanks for your quick reply.  Other than forking and exec'ing, is
there an easy way of determining this value within a C program?

You could write code (perhaps using something like libelf) to iterate
through all the LOAD Program Headers, and add up their memory sizes.

You can see those easily enough using "readelf -l".
The only thing is that I was trying to avoid forking and exec'ing.

Marcus.

[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