From: Earnie B. <ear...@ya...> - 2003-05-12 11:59:46
|
Duncan Murdoch wrote: > On Mon, 12 May 2003 03:23:42 +0100, you wrote: > > > >>>So my question is: how would I go about fixing things so that I can >>>use the replacement malloc(), but still use atexit()? Is there a way >>>to tell DllMainCRTStartup to use the msvcrt malloc() function instead >>>of the replacement? >> >> >>One way would be to rewrite the startup code to use explicit dllimports >>of crt functions using LoadLibrary/GetProcAddress. That would ensure >>that atexit/malloc/free. etc all came from msvcrt.dll. >> >>Another way would to be force the dll version in crt startup by >>activating the _CRTIMP macro so that the startup code references >>__imp__malloc, etc. That, however, can lead to other problems with >>multiple definitions. > Another work around is to create your malloc as mymalloc and then define malloc mymalloc. > > Is this something that should be reported as a bug or feature request > to the MinGW developers? > Where aware of it, already, so no. Earnie. |