[Adium-devl] [Adium-svn] rev 22205 - trunk/Plugins/Purple Service

Evan Schoenberg evan.s at dreskin.net
Wed Jan 9 01:19:40 UTC 2008


On Jan 8, 2008, at 7:19 PM, Peter Hosey wrote:

> On Jan 08, 2008, at 16:05:17, evands at adiumx.com wrote:
>> Documentation of `SecCertificateGetData()` says that we should  
>> malloc space for its return data, so we should do so.
>
> Er, no, it doesn't say that. It says we should allocate space for  
> it[1]:
>
>> You must allocate the space for a CSSM_DATA structure before  
>> calling this function.
>
> The previous code did that with the stack.

I didn't realize that the stack would allocate space.  As far as I  
knew, malloc() was the way to allocate space.

I'm fine with reverting it - I did so in [22205]/[22206].  We use a  
very significant, un-regainable chunk of memory the first time that  
method is run, and I came across that while trying to figure out why.   
It doesn't fix the problem. It appears that SecTrustEvaluate() loads  
all your keychain information via the security framework and does you  
a huge favor by caching it until the application quits.  For me, that'  
uses about 2 MB of RAM.

Something else is allocated there, too, and sticks around, according  
OmniObjectMeter, but I can't tell what (OOM is about 2/3 of a great  
tool... and 1/3 extremely frustrating in that it doesn't show  
information that other tools, like MallocDebug, do, and wants to  
resolve every function call that isn't within Adium itself to  
__eprintf() or another random function).. and there don't appear to be  
any leaks.

-Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20080108/548d7980/attachment-0001.html>


More information about the devel mailing list