From 208e3c94ae00e35444bfee434031319b7981b1ab Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 15 Sep 2009 22:26:59 +0200 Subject: explain in more detail why we don't support jemalloc --- mutrace.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mutrace.c b/mutrace.c index d5ddae2..6a17a0e 100644 --- a/mutrace.c +++ b/mutrace.c @@ -228,6 +228,16 @@ static void setup(void) { "mutrace: alternative memory allocator (jemalloc?) which is not compatible with\n" "mutrace: mutrace. Please rebuild your program with the standard memory\n" "mutrace: allocator or fix mutrace to handle yours correctly.\n"); + + /* The reason for this is that jemalloc and other + * allocators tend to call pthread_mutex_xxx() from + * the allocator. However, we need to call malloc() + * ourselves from some mutex operations so this might + * create an endless loop eventually overflowing the + * stack. glibc's malloc() does locking too but uses + * lock routines that do not end up calling + * pthread_mutex_xxx(). */ + real_exit(1); } -- cgit