Re: How to get the total heap size of the process



ganesh.kundapur@xxxxxxxxx wrote:
Hi all,
Is there any way to get the total heap size of the process in c on
linux platform?

--
Ganesh

You can get the total size of all rw segments by reading /proc/self/maps; unfortunately you cant make the difference between stack, data, bss, and heap (at least, not easily).

Cheers,
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux@xxxxxxxxxxx

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
.



Relevant Pages

  • Re: How to get total heap size of a process
    ... Is there any way to get the total heap size allocated to a process ... in c on linux platform. ... They never stop thinking about new ways to harm our country ... attacked and denounce the pacifists for lack of patriotism ...
    (comp.lang.c)
  • Re: How to get total heap size of a process
    ... Is there any way to get the total heap size allocated to a process ... in c on linux platform. ... Ask in a Linux group? ... Ian Collins. ...
    (comp.lang.c)
  • Re: How to get total heap size of a process
    ... Is there any way to get the total heap size allocated to a process ... in c on linux platform. ... int main ... Because printf can't handle a size_t? ...
    (comp.lang.c)
  • Re: How to get total heap size of a process
    ... $1.25 download or $7.20 paper, ... Is there any way to get the total heap size allocated to a process ... in c on linux platform. ... int main ...
    (comp.lang.c)