This is the mail archive of the 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: [PATCH] New getifaddrs implementation

On Wed, Mar 26, Ulrich Drepper wrote:

> Hash: SHA1
> Thorsten Kukuk wrote:
> > I wrote a new getaddrinfo implementation for Linux,
> Reading this I got really exciting...

Argh, I shouldn't work on two functions with similar names at the
same time ...
> > which uses the netlink kernel interface and works with IPv6, too.
> ... but this sounded strange :-).  You mean getifaddrs...
> How does this implementation react if netlink is not available?  Netlink
> is optional, right?  If yes, we probably need a fallback solution.

Yes, netlink is optional, but all tools to configure the network use
netlink today. So without netlink you have a hard time to configure
your interfaces. But I think it is possible to use the current
implementation as fallback.

> What worries me most is the memory handling.  First, there are several
> places where the malloc/calloc results are not checked for NULL.  This
> will require cleanups.  Also, the number of separate memory operations
> is high.  It should be possible to use exactly one chunk of memory.
> Memory allocation is relatively slow and many allocations might lead to
> fragmentation.  If possible, for instance for the temporary objects used
> in the functions, alloca should be used.  This might mean merging a
> functions or two but that's OK.

Ok, I will try to change this due the next days.


Thorsten Kukuk        kukuk at suse dot de
SuSE Linux AG        Deutschherrnstr. 15-19        D-90429 Nuernberg
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B

Attachment: pgp00000.pgp
Description: PGP signature

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