This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: wrong performance of malloc/free under multi-threading


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]