From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49753 invoked by alias); 21 Oct 2015 15:40:28 -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 49000 invoked by uid 89); 21 Oct 2015 15:40:26 -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; Wed, 21 Oct 2015 15:40:24 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 8261BA803D5; Wed, 21 Oct 2015 17:40:21 +0200 (CEST) Date: Wed, 21 Oct 2015 16:06:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com, cygwin-developers@cygwin.com Subject: Re: Jemalloc under CYGWIN Message-ID: <20151021154021.GA19868@calimero.vinschen.de> Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin@cygwin.com, cygwin-developers@cygwin.com References: <20151021105300.GN5319@calimero.vinschen.de> <20151021141523.GV5319@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qMm9M+Fa2AknHoGS" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-10/txt/msg00353.txt.bz2 --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1229 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() calls > >> 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/intern= al/mutex.h#L80 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. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --qMm9M+Fa2AknHoGS Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWJ7HlAAoJEPU2Bp2uRE+gmeQP/jeKklWZcEcxqmkQOxyQt6cW jkJG51qJj1RpodBexXBPRj/qIwfvOuYbpK4C490+mO4wGDaHfRtlQYNrBUWHhGzQ Mk9Ja/GC29Xxf+TcBGfLOnKb6XaSESpMjFBB21JAHNaT++UhpjWjmknn5uCeYa75 xzkwnwpdKNiic/wBDZ5bi9MbZr0a07yL6dM/4t/yIxz9/wM1ddmx8ywFoFeRYGEw Lry9Da0Ng8EUcIWeZEHJY4CUddRCuVT1wXXyj3uLLF/15F5K9FfuqjwDDZITgK5G 36zMNPnkqlEUh5nDkeyV3Y+JVHaqabUVFGHCLE4vGAkUeIobf8fNzvHJG56InoQa 2XHkA7va7K2p3VOY78KptKyddEhKvq/um6nvN/2kW97m8JaF9B6mGuIQmMrYirso lBVCf1NohhqthM5yL3gK6D7cuF5apFgTjBDi7+JNR31zHUNGK/QMBMVtiSl2mj7O kgEC1WNQFVgOLFUMMHXV310VVal4zuD4o2ta0BeJxuMg3x2iI7V3aJiTQoKdioPh 5X2by+Bw5CkurBCWVLDcpoqdkTb1wwkS0CE/US+oPmM9KVa1l8NV003nmY1LlSRa RWIqcT2kV8+cYAb2a8PSM5bqvcyu+2Vvutz0l82tPG7EYC7fm7ZkaNfBSmygdC8Q weCAdl2YXfVXGiY5BK7D =YMYb -----END PGP SIGNATURE----- --qMm9M+Fa2AknHoGS--