> 
> Tim Hudson wrote:
> 
>   > Can you make a small test program which demonstrates this behaviour?
> 
>   > Typically some cleanup code is being missed when this is sort of thing is 
>   > raised; however a bit of test code makes it fairly easy to track down 
> using a 
>   > combination of the malloc wrapper functions, valgrind and purify.
> 
> I'll try.  Currently all the functionality is in a library that
> wraps openssl, but I should be able to make single test program.
> I'll be out of the office until Monday, and will try to get to it
> then.  Thanks.
> 
> -Mike

Update: The "memory leak" is NOT in openssl.  

While getrusage() did indeed indicate that all growth in process size 
occurred within SSL_connect(), it seems likely that's because some other
non-openssl library was not properly freeing some small amounts of
memory (136 bytes per connection); and this caused memory avaiable for
reallocation to gradually decline over the hundreds (and indeed thousands)
of connections being performed.  As this progressed, SSL_connect()
occasionally  requested more than was available, and so the process size 
increased.  But to reiterate, the problem is actually in a different library, 
not in openssl.  I was able to work around the offending library, and when I 
did the process memory size was steady over 24,000 connections.

My sincere apologies for the false alarm.

-Mike

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to