[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: use of alloca()

On Fri, Nov 05, 2010 at 04:17:57AM -0700, Howard Chu wrote:
> A lot of what sl_malloc() is used for was really intended for a
> function that behaves like alloca(). What problems are we signing up
> for by allowing use of alloca()?

In Samba, we have a replacement called talloc_stackframe()
and talloc_tos(). It depends on talloc and thus malloc down
below. For performance we have added a very fast chunk
allocator for the request/response style smb server.

Apart from that, in Samba it's urban legend that alloca is
VERBOTEN... Not sure about the validity of that these days.