From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57230 invoked by alias); 26 Nov 2015 09:30:49 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 57213 invoked by uid 89); 26 Nov 2015 09:30:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Nov 2015 09:30:47 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 003CAA805ED; Thu, 26 Nov 2015 10:30:44 +0100 (CET) Date: Thu, 26 Nov 2015 09:34:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com, cygwin-developers@cygwin.com Subject: Re: Jemalloc under CYGWIN Message-ID: <20151126093044.GI2755@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com, cygwin-developers@cygwin.com References: <20151021105300.GN5319@calimero.vinschen.de> <20151021141523.GV5319@calimero.vinschen.de> <20151021154021.GA19868@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IvGM3kKqwtniy32b" Content-Disposition: inline In-Reply-To: <20151021154021.GA19868@calimero.vinschen.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-11/txt/msg00418.txt.bz2 --IvGM3kKqwtniy32b Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1480 Hi Yucong Sun, On Oct 21 17:40, Corinna Vinschen wrote: > On Oct 21 22:43, Yucong Sun wrote: > > On Wed, Oct 21, 2015 at 10:15 PM, Corinna Vinschen > > wrote: > > > On Oct 21 21:49, Yucong Sun wrote: > > >> > What exactly is the malloc problem you're seeing? > > >> > > >> The specific problem I'm having is that jemalloc's malloc_init() cal= ls > > >> needs to use pthread_mutex_init() or even pthread_mutex with a > > >> initializer. Both in-turn uses malloc, triggering this issue. > > >> > > >> A quick fix would be somehow make pthread always use system > > >> malloc/free, which shouldn't be that bad. > > > > > > What about using a native critical section instead? It shouldn't be = too > > > tricky to conditionalize this in jemalloc. > >=20 > > Possibly, jemalloc already have support of this. However I wasn't so > > sure that this was possible before, > >=20 > > see https://github.com/jemalloc/jemalloc/blob/dev/include/jemalloc/inte= rnal/mutex.h#L80 >=20 > Yes, that looks good. Please use critical sections for the time being. > We're going to drop XP support end of this year, but up to that point we > can't use SRW locks. did you manage to include jemalloc into Cygwin in the meantime? It would be very cool to get a patch to replace dlmalloc with jemalloc :} Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --IvGM3kKqwtniy32b Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWVtFEAAoJEPU2Bp2uRE+gMGoP/iDpIIak5u1IcRj3bFi7ZWOA xafJrWFi6ooQzY+jx4fTENTFt3D+GnIcuxJdsFgCaCu+B97f/iOZxW96YN8NGHVs mf+Jg1vDrG02bDmayV4In/pdBgXOxXBzHzQtqX+HP5EuX4cDpq+GQD+AaPOBw1fJ Wpd/s27NFgwvrhJsQpVsTeOaPcFw2qGxlWOBBhqlxxEYBZGBWUYwZAiEi9qTT+Ey c9dq16woWxb97dFpuwa5vlzK+amHXYOAVPlC2k89jv5aQj5XTmCwzqcNJhq1BTcl djAh9eiY/yjxGGNZRvs6GxA4x94Ang1FWwyM+B3zScKaDhgtPDS6PRFV+zLt0Jb6 qO9oMnMyx3QaSEvUMeoWj2FRxlbvL2BFk5OOvsRz1WPeSVCt7ElWvJLQ8tx/9X+D YHM0RhVlO2vDcnthsFs8M8xpdN3f5A3M/bo2nDViMM0D1LarOU3SqWGNONXpaXz4 7LU4wsPxj29BCTgzw8GBLmu6pkhRs+fY5RKoMqYuWrB6Hq8yuqwuZFlXqquaxUsw G+9h8PJnl1Cp9p8L6XLiyi1EaAqCUOHyaJfCTdSbbjaKHcHkCcDR10SH4s8352bj eBtJvggd8cyFwXFWnHylfBhBe1zq7bsJ8f1hP5lWJKs59OE93JVweOgPOnhpsr64 nMRZHDyLfH6/fJoiWEct =E09M -----END PGP SIGNATURE----- --IvGM3kKqwtniy32b--