[Gllug] mallinfo
Nix
nix at esperi.org.uk
Fri Nov 2 15:11:30 UTC 2007
On 2 Nov 2007, t. clarke spake thusly:
> Thanks for that further info Nix.
>
> On that basis I won't bother to recompile the process in use.
> If the 150k is effectively spurious I need not worry about it.
Simply starting a process allocates 100Kb or so of storage for the
i18n stuff done by the glibc startup code.
You can shrink it, but only by switching to uClibc or something (and
then of course you lose binary compatibility, i18n, and so on).
> The process concerned never appears to report a larger figure,
> so it would seem that my malloc and free usage is working correctly
> and the thing is not 'leaking' memory, which was my main concern.
If something that simple could leak memory, *nothing* on your system
would work. (Consider how many malloc() calls X makes, for instance.)
> The other concern was simply to get some sort of handle on the amount of
> memory being consumed (by a hashed-and-linked table). If its below 150K
> I have no worries at all :-)
valgrind's memcheck tool might be useful here: it tells you the total
count of allocations at the end of its run.
--
`Some people don't think performance issues are "real bugs", and I think
such people shouldn't be allowed to program.' --- Linus Torvalds
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list