From: "David Schwartz" <[EMAIL PROTECTED]>
Reply-To: openssl-dev@openssl.org
To: <openssl-dev@openssl.org>
Subject: RE: Memory Leaks in SSL_Library_init()
Date: Tue, 20 Mar 2007 05:02:01 -0700


> The function SSL_library_init() is observed to be introudcing
> memory leak in
> the application code. There is still some amount of memory leak left even
> after the series of cleanup calls suggested in the openssl FAQ.
>
> Can someone help understand that technically what is the problem
> in having a
> single cleanup call like SSL_library_cleanup, instead of a using
> a series of
> cleanup calls?

It's pretty much the same issue as every other library in the world. Perfect
cleanup is extremely difficult and often adds performance overhead during
use.

Keepin it apart from the memory leak, i would like to know by example how a
perfect cleanup can casue performance problems?

Since nobody really cares whether you can free every single byte before
you terminate a process, nobody bothers to code it.

Not just for a single byte, but in embedded systems and in deviced with resource contraints woudn't we care about even a small amount of memory not being freed after it is no more required?

For example, singletons
can be very difficult to remove. How and when do you remove a memory
manager?

As for the series of cleanup calls, there are several reasons. The two main
ones are that you might need to cleanup different things and some cleanup
functions need to be called from a particular context.

Your first sentence is pretty funny though. How can a function you can only
call once in the lifetime of a process introduce a memory leak?

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

_________________________________________________________________
Voice your questions and our experts will answer them http://content.msn.co.in/Lifestyle/AskExpert/Default01.htm

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to