[Adium-devl] Top 10 malloc call stacks in Adium
David Smith
catfish.man at gmail.com
Fri Jul 18 18:56:15 UTC 2008
Using the wonderful malloc_history -all_by_count tool I have a
document with a list of every memory allocation call stack in Adium
(as of when I ran the report), grouped, and sorted by frequency. I've
put the top 10* here: http://dscoder.com/adiumtop10mallocs.txt
Some things immediately stand out:
1) 3 functions are responsible for our top 10 malloc callstacks:
purple_buddy_new, [AIPreferenceContainer prefs], and
CFHTTPCookieStorageCopyCookiesForURL
2) (this is more informational, you can't tell it from the document)
All 18000+ of the #1 call stack happen even with no internet
connection, and therefore no active connections. In fact, once it's
done those 18000 all at once on startup, that call stack never appears
again.
As for whether this data is actually worth something... hard to say.
It looks to me like we should be able to allocate less in many of
these situations, but I don't actually have any concrete improvements
to suggest right now. It's also unclear how valuable allocating less
would actually be; frequent calls to malloc is certainly a nice
heuristic, but may not be all that related to what's actually causing
high memory usage. So, caveat emptor, but I think there's probably
something of use here :)
*the full output is 10MB. If people want it, I'll post it, but I
figure the top 10 is probably more useful for now.
David
More information about the devel
mailing list