Hi!
I'm use gethostbyaddr() for name resolving. But when I'm call
gethostbyaddr() many times, the memory, allocated by the program is growing
(see attach). Why?
Hmm I thought this would be an obvious thing - its returning a pointer to
memory you didnt give it so therefore your supposed to clean up. However
this is not always the case so I thought I would check SUS ... and I was
supprised to find that it was specifically ambiguous?? I fail to see how a
specification can get away with saying the return 'Might' point to static
memory. But indeed it does... wierd. and SUSv3 says that gethostbyaddr is
obsolete and getaddrinfo is recommend to be used instead (which looks like
it Doesnt use static memory so your responsible for cleaning it up).