In message <[EMAIL PROTECTED]> on Wed, 23 Mar 2005 12:28:51 -0800, Michael 
D'Errico <[EMAIL PROTECTED]> said:

mike-mlm> > Try the FAQ. This gets asked a *lot*.
mike-mlm> 
mike-mlm> I call ERR_remove_state in my thread cleanup
mike-mlm> routine, but was unaware of the other functions
mike-mlm> mentioned in the FAQ.  Should I also call these
mike-mlm> other functions in my thread cleanup routine?
mike-mlm> Or is the data allocated per-application and
mike-mlm> not per-thread?

I just changed the FAQ to say the following:

----------------------------------------------------------------------
* I think I've detected a memory leak, is this a bug?

In most cases the cause of an apparent memory leak is an OpenSSL internal table
that is allocated when an application starts up. Since such tables do not grow
in size over time they are harmless.

These internal tables can be freed up when an application closes using various
functions.  Currently these include following:

Thread-local cleanup functions:

  ERR_remove_state()

Application-global cleanup functions that are aware of usage (and therefore
thread-safe):

  ENGINE_cleanup() and CONF_modules_unload()

"Brutal" (thread-unsafe) Application-global cleanup functions:

  ERR_free_strings(), EVP_cleanup() and CRYPTO_cleanup_all_ex_data().
----------------------------------------------------------------------

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte                         [EMAIL PROTECTED]
                                        http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to