More (?) steps toward jemalloc within Cygwin DLL
Mark Geisert
mark@maxrnd.com
Tue Jun 16 09:16:14 GMT 2020
I'm just putting a flag down on this new (to me) territory. If somebody
else has claimed this project already, let me know and I'll shove off.
It wasn't much trouble to build a jemalloc.lib and statically link it into
the Cygwin DLL when the latter is built. I'm still learning which
jemalloc configure options are required in order to get complete test
coverage and to initialize properly within cygwin1.dll.
I'm currently using the "supply your own malloc" mechanism provided by
Cygwin's malloc_wrapper.cc to overlay the usual dlmalloc-sourced functions
with replacements from jemalloc. I suspect there will be allocation
collisions ahead...
One question has popped up though. I see from the docs that if one wants
jemalloc to run thread-aware, it wraps pthread_create() to find out when
the app has gone from single-threaded to multi-threaded. But in Cygwin's
case we'll additionally need to consider cygthreads, won't we?
Thanks,
..mark
More information about the Cygwin-developers
mailing list