Re: memory allocations.

Sander Vesik <sv117949 ireland sun com> writes:

> But we definately need to have a size/frequency distribution graphs for
> common applications and use patterns first before doing anything.

Well, run

  memusage <program> <arguments>...

This will give you the size distribution.  Run

  memusage -p <output>.png <program> <arguments>...

to get you'll get the allocation history over time or number of
allocations.  There are more parameters, run memusage --help.

Of course this works only on systesm with glibc.

I just ran this with gedit (don't know whether this is a good choice).
47% of all allocations are less than 16 bytes, 75% are less then 32
bytes.  The PNG file shows you at which times in the program run the
many little allocations happened.

---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at   `------------------------

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