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=AwTlmcB fg7ZnWoXzWoqfW7VkKRHaygVGwJdZK0fdlKWMtmJeSZ9lKcSxJEdt8h61vJEj6F1 svJaU7K5U2i7SLawWMq7SQzy19Oo4kfRayX9oBEX/EkAKa/hEsur8cYaNYlJFVrC ZSG/jfGOxlokgQMe427pK3taQ8dFDFNFwB3g= 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=XPH1oAhdAxcnv Stq1lLkAHQ2Fwc=; b=UTGumpCbmB5rtccqDRz10M/F8iCEMWQv+AtGIFIOD0C+2 LaFfVdWFQ8MzUWuRIYBM+Vxw7Np9uBZpoC+66Lp94aw8BvCoRKFYp7JPQWjoSLy4 PTlcyhkyMKQsn/C1cNAkoh3U7W6+ZFHrBJ2tMCq48RHAPGGGXc51doce/AUodU= 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 Delivered-To: corinna-cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 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, 3 recipients X-HELO: mail-lf0-f45.google.com X-Received: by 10.25.30.84 with SMTP id e81mr3588421lfe.48.1445435426085; Wed, 21 Oct 2015 06:50:26 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20151021105300.GN5319@calimero.vinschen.de> References: <20151021105300 DOT GN5319 AT calimero DOT vinschen DOT de> From: Yucong Sun Date: Wed, 21 Oct 2015 21:49:56 +0800 Message-ID: Subject: Re: Jemalloc under CYGWIN To: corinna-cygwin AT cygwin DOT com, cygwin-developers AT cygwin DOT com, cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes > 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. Another issue I saw is that jemalloc will use readlink() for "/etc/jemalloc.conf" during malloc_init(), which on cygwin, this function uses "new" to do some path manipulating work, which also have the same issue. However, we can probably just disable that . So, the quickest fix would be to make cygwin's thread implementations always use system malloc. some small workarounds in jemalloc would be needed afterwards, but it should be a nice starting point. -- 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