From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3011 invoked by alias); 21 Oct 2015 14:44: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 2587 invoked by uid 89); 21 Oct 2015 14:44:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-lb0-f176.google.com Received: from mail-lb0-f176.google.com (HELO mail-lb0-f176.google.com) (209.85.217.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 21 Oct 2015 14:44:38 +0000 Received: by lbcao8 with SMTP id ao8so40100007lbc.3; Wed, 21 Oct 2015 07:44:25 -0700 (PDT) X-Received: by 10.112.154.7 with SMTP id vk7mr5637701lbb.48.1445438665465; Wed, 21 Oct 2015 07:44:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.21.228 with HTTP; Wed, 21 Oct 2015 07:43:55 -0700 (PDT) In-Reply-To: <20151021141523.GV5319@calimero.vinschen.de> References: <20151021105300.GN5319@calimero.vinschen.de> <20151021141523.GV5319@calimero.vinschen.de> From: Yucong Sun Date: Wed, 21 Oct 2015 15:40:00 -0000 Message-ID: Subject: Re: Jemalloc under CYGWIN To: cygwin@cygwin.com, cygwin-developers@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00351.txt.bz2 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. Possibly, jemalloc already have support of this. However I wasn't so sure that this was possible before, see https://github.com/jemalloc/jemalloc/blob/dev/include/jemalloc/internal/mutex.h#L80 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple