Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: mayzen@acxiom.co.uk (Mark Ayzenshteyn)
Subject: drop in replacement of malloc for tru64 issues
Date: 9 Aug 2001 06:32:46 -0700	[thread overview]
Message-ID: <844d60bd.0108090532.23844f03@posting.google.com> (raw)

Hi all,

I am trying to use a drop in replacement for malloc on a Digital Unix
4.0F system. Its a 4 CPU box and the performance of the libc malloc in
a multi-threaded enviorment is too slow. So far I have tried libhoard
and ptmalloc and both produce the same result.
The program crashes trying to initialise a mutex. From the stack
trace(see below) it seems the program never gets into my code. Instead
when libc is being initialised it tries to allocate some memory using
the drop in malloc(ptmalloc in this case). The ptmalloc tries to
initialise a mutex and the pthread_mutex_init called crashes. This
would imply the DECthreads are not fully initialised at this point.
Does anyone have any pointers on how to solve this problem? I am going
through the comments in pthread.h and I have a few other ideas, but I
thought perhaps someone in this newsgroup has done something similar
before and can quickly point me in the right direction.

Cheers,

Mark



Thread terminated at PC 0x3ff8059f704 by signal SEGV
(ladebug) tstack
Stack trace for thread 3
>0  0x3ff8059f704 in __muGetBlock(0x0, 0x140000ae8, 0x0, 0x11ffff450,
0x0, 0x44) in /usr/shlib/libpthread.so
#1  0x3ff8059e190 in __pthread_mutex_init(0x0, 0x140000ae8, 0x0,
0x11ffff450, 0x0, 0x44) in /usr/shlib/libpthread.so
#2  0x120002c98 in ptmalloc_init(0x0, 0x140000ae8, 0x0, 0x11ffff450,
0x0, 0x44) in ./threadtest
#3  0x120002ef8 in UnknownProcedure3FromFile3(0x0, 0x140000ae8, 0x0,
0x11ffff450, 0x0, 0x44) in ./threadtest
#4  0x120003a3c in malloc(0x0, 0x140000ae8, 0x0, 0x11ffff450, 0x0,
0x44) in ./threadtest
#5  0x3ff800dbed0 in __exc_add_gp_range(0x0, 0x140000ae8, 0x0,
0x11ffff450, 0x0, 0x44) in /usr/shlib/libc.so
#6  0x3ff8010186c in _call_add_gp_range(0x0, 0x140000ae8, 0x0,
0x11ffff450, 0x0, 0x44) in /usr/shlib/libc.so
#7  0x3ff801a5be8 in /usr/shlib/libc.so
#8  0x3ff80017fc0


             reply	other threads:[~2001-08-09 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-09 13:32 Mark Ayzenshteyn [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-08-09 13:32 drop in replacement of malloc for tru64 issues Mark Ayzenshteyn
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox