X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; q=dns; s=default; b=s2JQ1M5 Sj7nV5lRGzfKJEap5HY716eP9vKppsXDCaWyKp3r1p2eMmWLiO8IibA86a9XZf5+ 5nQ0x6fVGCZETtaC47i91+J8JoOnMwHN+hf/XG8T8tWjjF0vtIoucwycqF/u+Phk j83e8OJXIY9hpo2aLpcWMAUd02q92qyWowBU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; s=default; bh=h/cCunHM4Xn+M bECxK5vYVviQ8E=; b=vll2irBroQJK2xVLxvdN0NL8AveoekurrFK32sjllRQGU G6rjARBR8utHFtm3QrurlE+40u0D+iZ+DOiRRTJSPGrH0rqFE9stJfVVQAnT00Yo KvSBihwk9fAGwmQJO3WrPA9OAyBSkLs2ytSxWq4izyuSuYrLbT8ZqvQiZSkEkE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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 In-Reply-To: <20151021141523.GV5319@calimero.vinschen.de> References: <20151021105300 DOT GN5319 AT calimero DOT vinschen DOT de> <20151021141523 DOT GV5319 AT calimero DOT vinschen DOT de> From: Yucong Sun Date: Wed, 21 Oct 2015 22:43:55 +0800 Message-ID: Subject: Re: Jemalloc under CYGWIN To: cygwin AT cygwin DOT com, cygwin-developers AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes 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