lkml.org 
[lkml]   [2000]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] solution for the inet_ntoa problem, buffer allocator
On Wed, Jul 05, 2000 at 02:08:49PM +0200, Olaf Titz wrote:
> The buffer allocation works as follows: every conversion routine has
> its own chain (salloc_t) of buffers (scope_buf_t). Whenever a buffer
> is needed, it looks for a free one in the chain. Each buffer is tagged
> with the return address of the caller (here called "scope"). A buffer
Very clever. But probably too fragile for various reasons. A ring of
say 30 buffers might be less fragile and simpler.

As others have pointed out a new format specifier would be the best
solution. Extending gcc function attributes for checking the format
string would be necessary. IMHO the time is right to push this into
egcs/gcc, at least for IPv6 addresses.

It can all be done (also for IPv4) such, that a ring buffer fallback
for earlier gcc versions would handle the current situation with the
many gcc versions out there gracefully.

--
Frank

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.128 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site