This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: Patch to dcrt0.cc for dmalloc
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Wed, 5 Apr 2006 20:40:16 -0400
- Subject: Re: Patch to dcrt0.cc for dmalloc
- References: <3.0.5.32.20060405201622.009b7100@incoming.verizon.net>
- Reply-to: cygwin-patches at cygwin dot com
On Wed, Apr 05, 2006 at 08:16:22PM -0400, Pierre A. Humblet wrote:
>2006-04-06 Pierre Humblet <Pierre.Humblet@ieee.org>
>
> * drct0.cc (dll_crt0_1): Move malloc_init after
>user_data->resourcelocks->Init.
As I mentioned in cygwin-developers "those two lines" (i.e., the ->Init
lines that are required for proper operation of user_data->resourcelocks
that you were mentioning) could and have been moved back into dll_crt0_0
so there is no reason for this patch that I can see.
cgf
>diff -u -p -r1.303 dcrt0.cc
>--- dcrt0.cc 3 Apr 2006 17:33:07 -0000 1.303
>+++ dcrt0.cc 5 Apr 2006 16:07:53 -0000
>@@ -784,7 +784,6 @@ static void
> dll_crt0_1 (char *)
> {
> check_sanity_and_sync (user_data);
>- malloc_init ();
> #ifdef CGF
> int i = 0;
> const int n = 2 * 1024 * 1024;
>@@ -794,6 +793,7 @@ dll_crt0_1 (char *)
>
> user_data->resourcelocks->Init ();
> user_data->threadinterface->Init ();
>+ malloc_init ();
> ProtectHandle (hMainProc);
> ProtectHandle (hMainThread);
>