public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Yucong Sun <sunyucong@gmail.com>
To: cygwin@cygwin.com, cygwin-developers@cygwin.com
Subject: Re: Jemalloc under CYGWIN
Date: Wed, 21 Oct 2015 15:40:00 -0000	[thread overview]
Message-ID: <CAJygYd1a82LVP0EuKyDtrux=6uJ=rN95yRghy3sdkKU+_9yt5Q@mail.gmail.com> (raw)
In-Reply-To: <20151021141523.GV5319@calimero.vinschen.de>

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

  reply	other threads:[~2015-10-21 14:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07 11:18 Yucong Sun
2015-10-16 15:57 ` Yucong Sun
2015-10-21 10:53   ` Corinna Vinschen
2015-10-21 13:50     ` Yucong Sun
2015-10-21 14:15       ` Yucong Sun
2015-10-21 14:16       ` Corinna Vinschen
2015-10-21 15:40         ` Yucong Sun [this message]
2015-10-21 16:06           ` Corinna Vinschen
2015-11-26  9:34             ` Corinna Vinschen
     [not found]               ` <CAJygYd232P=HQVufwQKtU37hHDiJZO5gzpM7fPKndLGMycJBgw@mail.gmail.com>
2015-12-05 14:32                 ` Yucong Sun
2015-12-05 17:05                   ` Andrey Repin
2015-12-06 14:08                   ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJygYd1a82LVP0EuKyDtrux=6uJ=rN95yRghy3sdkKU+_9yt5Q@mail.gmail.com' \
    --to=sunyucong@gmail.com \
    --cc=cygwin-developers@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).