thoughs on splitting up malloc.c
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Tue Sep 2 21:08:55 GMT 2025
Hi Florian,
> If we refactor this, it should be done in such a way that we can
> duplicate the frontend code with IFUNCs. For example, for the initial
> libc, we want the tcache to be located in the TCB, but such an
> implementation could not be used by secondary libcs.
Yes, I think ifuncs would be a good way to select between standard malloc,
one with extra checking/statistics enabled, and an MTE version as well.
You only really need to use ifuncs for performance critical entry points.
It means the entry points need to go in their own C file which can be built
multiple times using different settings and headers for TLS data.
Cheers,
Wilco
More information about the Libc-alpha
mailing list