This is the mail archive of the
mailing list for the glibc project.
Re: extend dl-minimal malloc implementation
On 08/17/2017 03:10 PM, Zack Weinberg wrote:
> _Do_ we, though? Why does ld.so need to make any allocations at all
> above and beyond mapping in the libraries? It's an open question as
> far as I'm concerned.
If we want to delay IFUNC resolution until the target DSO providing the
IFUNC resolver has been relocated (something which our very own
libpthread currently needs), we need to store this information
somewhere, and we do not know beforehand how many such IFUNC resolvers
Stack allocation has a cost as well. If the program does not use the
main stack much after startup, then all these alloca optimizations
actually increase RSS. An allocator with an explicit deallocation
operation could return unused memory to the operating system in a
straightforward way. (We might still lose if there is too much