[PATCH 5/5] Add single-threaded path to _int_malloc
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Tue Oct 24 13:49:00 GMT 2017
DJ Delorie wrote:
>
> Looks good to me.
OK it's all committed now. Thanks for the reviews!
> > We could use the ifunc mechanism to decide between different variants -
> > including for example for the single-thread optimization.
>
> I suspect ifuncs are chosen before we know if the program will spawn any
> threads, though.
I was thinking of dynamically updating the ifunc, for example if we want to trace,
hook or enable more expensive checking. That way there is no need to check
for all special cases on every call, and additional code can be enabled or
disabled at runtime by swapping to a different variant of malloc/free.
Wilco
More information about the Libc-alpha
mailing list