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: alloca vs malloc


On Sat, May 17, 2014 at 12:07:54AM +0000, Joseph S. Myers wrote:
> On Sat, 17 May 2014, Ondrej Bilka wrote:
> 
> > For libc there are better alternatives, I will add priority to malloca
> > cleanup. As glibc code is now alloca are mostly
> > trivial or following this pattern occuring about hundred times:
> 
> I suggest doing such cleanup in a maximally conservative and incremental 
> way:

One straightforward set of changes in this area would be to replace
the alloca+extend_alloca usage in getaddrinfo code with straight
malloc+free.  I doubt if the performance improvement due to using
alloca is in any way noticeable in those functions given that the
major costs there would be file or network I/O.

Siddhesh

Attachment: pgpwLjjzJRzW9.pgp
Description: PGP signature


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