From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com, cygwin-developers@cygwin.com
Subject: Re: Jemalloc under CYGWIN
Date: Thu, 26 Nov 2015 09:34:00 -0000 [thread overview]
Message-ID: <20151126093044.GI2755@calimero.vinschen.de> (raw)
In-Reply-To: <20151021154021.GA19868@calimero.vinschen.de>
[-- Attachment #1: Type: text/plain, Size: 1505 bytes --]
Hi Yucong Sun,
On Oct 21 17:40, Corinna Vinschen wrote:
> On Oct 21 22:43, Yucong Sun wrote:
> > 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
>
> Yes, that looks good. Please use critical sections for the time being.
> We're going to drop XP support end of this year, but up to that point we
> can't use SRW locks.
did you manage to include jemalloc into Cygwin in the meantime? It
would be very cool to get a patch to replace dlmalloc with jemalloc :}
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-11-26 9:30 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
2015-10-21 16:06 ` Corinna Vinschen
2015-11-26 9:34 ` Corinna Vinschen [this message]
[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=20151126093044.GI2755@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.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).