emulating `alloca()` in C -


if read through gnu libs docs, can see:

some non-gnu systems fail support alloca, less portable. however, slower emulation of alloca written in c available use on systems deficiency.

how c emulation of alloca() like, assuming vlas not available either?

according alloca() is

the alloca() function allocates size bytes of space in stack frame of caller. temporary space automatically freed when function called alloca() returns caller.

implementation platform-specific, , compiler should aware of it, since generated code must respect non-fixed offsets of locals @ stack frame. if toolchain has no vla - have nothing it.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -