> I noticed that when I run the straight c version (m.c below) that at
> malloc.c:2679 (from glibc-2.1.3-21.src.rpm from RedHat) that
> __malloc_hook has a nonnull value.  But the in the .so version loaded by
> perl (TT.xs below compiled to .so) __malloc_hook is null.  What do I
> need to do to get __malloc_hook defined in the .so version?

You can't and shouldn't.

Like I've just posted on netnews in response to your first query, if
you want to use malloc (or more generally libc) with multiple threads,
the application (in your case the perl interpreter) will have to be
linked against libpthread.

Loading libpthread at runtime cannot work properly, AFAIK.

Regards,
Wolfram.

Reply via email to