delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/10/21/10:45:13

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: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: <CAJygYd2T9JSJCDT178F8mzmuA79MsBbWCLsr8eF7Aguxk_-YWQ AT mail DOT gmail DOT com> <CAJygYd1tU+Nc5+owTw0Lfuk8SWQQS2vE1mhKjoz5br4c9zVF8A AT mail DOT gmail DOT com> <20151021105300 DOT GN5319 AT calimero DOT vinschen DOT de> <CAJygYd3o5tjmLx8e8zCFi+T5LxzBLk02nMrcC03Fp-MbnuBsHQ AT mail DOT gmail DOT com> <20151021141523 DOT GV5319 AT calimero DOT vinschen DOT de>
From: Yucong Sun <sunyucong AT gmail DOT com>
Date: Wed, 21 Oct 2015 22:43:55 +0800
Message-ID: <CAJygYd1a82LVP0EuKyDtrux=6uJ=rN95yRghy3sdkKU+_9yt5Q@mail.gmail.com>
Subject: Re: Jemalloc under CYGWIN
To: cygwin AT cygwin DOT com, cygwin-developers AT cygwin DOT com
X-IsSubscribed: yes

On Wed, Oct 21, 2015 at 10:15 PM, Corinna Vinschen
<corinna-cygwin AT cygwin DOT com> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019