On Tue, May 02, 2006 at 09:42:18AM -0700, Roland Dreier wrote:
> Ishai> alloca man page on my system says: The alloca() function is
> Ishai> machine and compiler dependent. On many systems its
> Ishai> implementation is buggy. Its use is discouraged. Lets not
> Ishai> use it.
> The man page is talking about non-Linux systems I think. I don't know
> of any problems with any modern Linux libc so I think it's better to
> have something automatically leak proof.
As a note the standards compliant way to get 'alloca' is via C99
runtime sized arrays, ie:
void foo(int len)
{
char bar[len];
}
GCC has supported this feature from C99 for a very long time as long
as it isn't turned off by a compiler flag. alloca was never
standardized by ISO or POSIX.
--
Jason Gunthorpe <[EMAIL PROTECTED]> (780)4406067x832
Chief Technology Officer, Obsidian Research Corp Edmonton, Canada
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general