From: Yucong Sun <sunyucong@gmail.com>
To: corinna-cygwin@cygwin.com, cygwin-developers@cygwin.com,
cygwin@cygwin.com
Subject: Re: Jemalloc under CYGWIN
Date: Wed, 21 Oct 2015 14:15:00 -0000 [thread overview]
Message-ID: <CAJygYd3o5tjmLx8e8zCFi+T5LxzBLk02nMrcC03Fp-MbnuBsHQ@mail.gmail.com> (raw)
Message-ID: <20151021141500.DjE26gkhW7MsgvjxY-mneGqOT-LqtJUkNZxvXPkOfQ8@z> (raw)
In-Reply-To: <20151021105300.GN5319@calimero.vinschen.de>
> 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.
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 .
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.
--
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
next prev parent reply other threads:[~2015-10-21 13:50 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 [this message]
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
[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=CAJygYd3o5tjmLx8e8zCFi+T5LxzBLk02nMrcC03Fp-MbnuBsHQ@mail.gmail.com \
--to=sunyucong@gmail.com \
--cc=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).