[llvmlinux] Can alloca() be used in the kernel instead of VLAIS or VLA?
dwmw2 at infradead.org
Mon Feb 2 11:12:38 UTC 2015
On Mon, 2015-02-02 at 10:54 +0100, Behan Webster wrote:
> The kernel can't use the standard c library. It appears to since the
> kernel has implemented functions which look like those in the c
> library. But the kernel is in fact compiled with a bare compiler
> (essentially all userspace OS related stuff like libraries turned off)
alloca() isn't really a library thing — it's not as if it can be
implemented as a function you can call. The compiler has to handle it
The real reason we don't use alloca() in the kernel is because the
kernel has very limited stack space.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5745 bytes
Desc: not available
More information about the LLVMLinux