Date: Mon, 15 Sep 1997 06:23:04 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: hoek@hwcn.org Cc: karpen@ocean.campus.luth.se, tlambert@primenet.com, hackers@FreeBSD.ORG Subject: Re: Memory leak in getservbyXXX? Message-ID: <199709150623.XAA14978@usr04.primenet.com> In-Reply-To: <Pine.GSO.3.96.970915001015.2337C-100000@james.freenet.hamilton.on.ca> from "Tim Vanderhoek" at Sep 15, 97 00:23:09 am
next in thread | previous in thread | raw e-mail | index | archive | help
> I think he meant, > > "wouldn't it be nice if I could do" > > signal_handler () { > ... > pcopy = not_static_copy ("string", > global_buffer_i_happen_to_keep_always_lying_around_especially_\ > for_use_in_my_signal_handlers); > ... > } > > Or maybe he meant, > > "wouldn't it be nice if I could do" > > printf ("%s%s", unstatic ("ab", buf1), unstatic ("bb", buf2)); > > Of course, if I happen to pass NULL as the buffer, then it will > use its own static buffer. That's a nice compromise, actually. The only problem is that static buffers are intrinsically sized. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709150623.XAA14978>