Should malloc-related functions be weak?
Pedro Alves
palves@redhat.com
Mon Aug 1 11:04:00 GMT 2016
On 08/01/2016 11:39 AM, Florian Weimer wrote:
> On 08/01/2016 12:25 PM, Pedro Alves wrote:
>> Are these other symbols meant be overridden?
>
> These symbols (__malloc_fork_lock_parent etc.) are not supposed to be
> overridden, they are entirely internal to glibc and its malloc
> implementation. If the glibc malloc is interposed, these functions
> should not do anything.
Hmm, doesn't an interposing malloc need to worry about the same
scenarios these hooks were invented for?
Say I copy glibc malloc to my project, and tweak it somehow for my
workloads. How can I make my copy work just as correctly as the
builtin one?
Thanks,
Pedro Alves
More information about the Libc-alpha
mailing list