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 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 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