Peter Memishian wrote:

> lines 517-518, elsewhere: What happens if alloca fails (is such a thing > possible)?
It is no more or less possible than a stack allocation failing -- e.g., if
we're going to worry that:

        char buf[2048];

... might "fail" (in some equally undefined way), then we need to worry
about alloca().  But I think worrying about such things for any reasonable
buffer size (e.g., <8K) is needless.

While "char buf[2048]" is not, by itself, something to worry about,
putting large objects on the stack can be a problem for the kernel
where the stack size is limited.

A 2k buffer is 10% of the stack on x86 (20k) and slightly less on
sparcv9 (24k)...please tread carefully....excessive stack use by
networking code has caused problems in the past.

Darren

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to