Richard Levitte - VMS Whacker wrote:
>
> jaltman> If the LIBEAY32.DLL is linked to the MSVCRT.DLL library and the app
> jaltman> is linked to MSVCRTD.DLL it is necessary for CRYTPO_malloc_init() to
> jaltman> be executed by the app so that the proper memory
> jaltman> allocation/deallocations routines are used.
>
> CRYPTO_malloc_init() did the following:
>
> CRYPTO_set_mem_functions(malloc,realloc,free)
>
> This in turn initialises five function pointers in mem.c. However,
> those variables are already initialised with exactly those values.
> Logically, this makes the CRYPTO_malloc_init() macro redudant and
> needless.
>
> Is this possibly some kind of glitch in Win32 when it links things in
> runtime, or is it some other mystery?
>
I've put this back because the stuff wont even compile under Win32
without it.
The default behaviour is to use the memory allocation functions the
library was linked with which is the multithreaded DLL version.
When an application calls CRYPTO_malloc_init() it uses the malloc
functions the application was linked with.
Win32 has several versions of malloc and friends. If you mix them the
program crashes very quickly.
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]