From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com, cygwin-developers@cygwin.com
Subject: Re: Jemalloc under CYGWIN
Date: Wed, 21 Oct 2015 14:16:00 -0000 [thread overview]
Message-ID: <20151021141523.GV5319@calimero.vinschen.de> (raw)
In-Reply-To: <CAJygYd3o5tjmLx8e8zCFi+T5LxzBLk02nMrcC03Fp-MbnuBsHQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]
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.
> Another issue I saw is that jemalloc will use readlink() for
> "/etc/jemalloc.conf" during malloc_init(), which on cygwin, this
> function uses "new" to do some path manipulating work, which also have
> the same issue. However, we can probably just disable that .
Or alternatively the file can be reasd like the other files in /etc
Cygwin needs early access to. See the NT_readline class and an
example usage in, e.g, mount_info::from_fstab.
> So, the quickest fix would be to make cygwin's thread implementations
> always use system malloc.
>
> some small workarounds in jemalloc would be needed afterwards, but it
> should be a nice starting point.
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-10-21 14:15 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 [this message]
2015-10-21 15:40 ` Yucong Sun
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=20151021141523.GV5319@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).