This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
we encounter.

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
fragmentation, though.)

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]