Hello,

I attempted to port jemalloc to an old embedded system. It has linux 2.6.7/gcc 4.2.4/glibc 2.3.3 and uses linux threads instead of NPTL.

On this system there are a couple of additional recursive allocations inside pthread_atfork and pthread_setspecific.

I fixed the first issues by delaying pthread_atfork (and hoping we don't get forked during malloc_init_hard).

The second issue is nastier, see comments on the second patch.

Please let me know if you see anything obviously wrong. I did not test much, without these patches I get an immediate deadlock on startup or on the first allocation in a new thread. It should not affect systems with real TLS (__thread) support.

Please keep me in CC, I'm not subscribed to the list.

Crestez Dan Leonard (2):
  Delay pthread_atfork registering.
  Add support for LinuxThreads.

include/jemalloc/internal/tsd.h | 63 +++++++++++++++++++++++++++++++++++++++++
 src/jemalloc.c                  | 23 ++++++++-------
 2 files changed, 75 insertions(+), 11 deletions(-)

--
1.8.4.rc3



_______________________________________________
jemalloc-discuss mailing list
[email protected]
http://www.canonware.com/mailman/listinfo/jemalloc-discuss

Reply via email to