Jemalloc under CYGWIN

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Nov 26 09:30:00 GMT 2015


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-developers/attachments/20151126/1fb13324/attachment.sig>


More information about the Cygwin-developers mailing list