Ok, here comes the results of the discussion with the glibc developers
about __malloc_hook (and __free_hook etc):
For efficiency reasons, __malloc_hook is used internally by glibc to
initialize malloc. You're therefore not allowed to use __malloc_hook
_before_ malloc is initialized. The proper way to set __malloc_hook is
in __malloc_initialize_hook but not in main.
Therefore we could patch XEmacs to use __malloc_initialize_hook (AFAIK
emacs does this) to set the hook. But since we don't need these hooks
with doug lea's malloc, the best way is to not set it all as my second
patch does.
glibc will not be changed - but we're going to update the
documentation to clearly state these issues.
Andreas
--
Andreas Jaeger aj(a)suse.de aj(a)arthur.rhein-neckar.de
for pgp-key finger ajaeger(a)aixd1.rhrk.uni-kl.de
Show replies by date