Hallo all, I'm looking for guidelines/best practices on how to detect memory leaks.
I've bought the 'Network Security with OpenSSL' book, but it's not helpful in terms of low level OpenSSL programming, where I'm working with custom X.509 v3 extensions and a new network protocol with features based on TLS. At this moment I'm having difficulty processing all the custom extensions, which results in segmentation faults or memory leaks. My current development environment is: Ubuntu 10.04 x64, NetBeans 6.9.1, OpenSSL 1.0.0a and gcc 4 I've always used the profiling capabilities of Netbeans to detect memory leaks, but everything points to CRYPTO_malloc when using the OpenSSL library. I've recently discovered the memory debugging functions, but I can't find any documentation on them. CRYPTO_malloc_debug_init(); CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); MemCheck_start(); MemCheck_stop(); CRYPTO_mem_leaks(bio); Here's how I think I should go ahead on debugging memory leaks: I should CRYPTO_malloc_debug_init() and CRYPTO_set_mem_debug_options() at the application startup. Call MemCheck_start() right before the section where I want to do memory profiling and then call CRYPTO_mem_leaks() to get an indication of the memory leaks. Assistance would be much appreciated. Kind regards, Chris ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org