Is replacing alloca(3) where possible a good thing to do?

Allan Jude allanjude at freebsd.org
Wed Sep 14 15:30:58 UTC 2016


On 2016-09-14 10:48, Pedro Giffuni wrote:
> FWIW,
> 
> After some discussion with one of the principal Illumos developers it is
> clear that they won't accept replacing alloca(3) for the sake of
> "portability". You also can't always replace alloca(3) with VLAs anyways.
> 
> Pedro.
> 
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"

The one time I tried to use it, it went very badly, as it returns a
pointer, but the actual amount of memory was less than I had requested,
and so it smashed everything.

-- 
Allan Jude


More information about the freebsd-hackers mailing list