delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/02/26/14:17:44

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
X-Mail-Handler: Dyn Standard SMTP by Dyn
X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX195nAoBSVhDNGgp1mFOOi4e
Date: Tue, 26 Feb 2013 14:17:19 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: wrong performance of malloc/free under multi-threading
Message-ID: <20130226191719.GA954@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <2265626 DOT 1033831361860540947 DOT herumi AT nifty DOT com> <20130226091403 DOT GB2388 AT calimero DOT vinschen DOT de> <512C9B00 DOT 5040506 AT breisch DOT org> <20130226132544 DOT GC2388 AT calimero DOT vinschen DOT de> <kgiftm$dn2$1 AT ger DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <kgiftm$dn2$1@ger.gmane.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Tue, Feb 26, 2013 at 11:13:24PM +0900, jojelino wrote:
>On 2013-02-26 PM 10:25, Corinna Vinschen wrote:
>>This is Cygwin only.
>>
>cygwin malloc is not reentrant according to malloc_wrapper.cc so let's
>not expect performance like linux or native windows.  until someone
>have plenty of time to resolve this issue.

It's a fairly simple matter to drop in a version of malloc which is
truly multi-threaded, removing the locks in the malloc wrapper.
Figuring out which malloc is the best and insuring that we haven't
broken anything which relies on the subtle behavior of dlmalloc
isn't.  Maybe that's what you're saying.

One gotcha is that some multi-threaded mallocs use memory profligately.
So, that's something that we have to be aware of when we change mallocs.

cgf

--
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