That's why I use it. It seems to work fine if you use it wisely. As for it being portable, heck if I know. I don't care if Windows can't do something Linux can because I hate Windows.
The things you hear when you don't have an elephant gun, a sack of lime, and deep hole.
Anyway, `alloca' support has nothing to do with the operating system; the function is or is not a feature of a compiler.
Look at the example from Hodor:
With many implementations of `alloca', you have no way of knowing if the allocation was successful, and without that information "use it wisely" is off the table. Unlike simple over-allocation or "VLA", the problem here isn't born simply of overflowing the stack; the unreliability of the implementations (The return value being undefined with problematic allocation is only one problem area.) is unsuitable for stable code even when overflow doesn't occur.
char *mem = alloca(909204922490);
By the by Hodor, this is where you went in the wrong direction. The over-allocation as with "VLA" or other automatic variable has nothing to do with my comments. The poorly defined and respected semantics make `alloca' a big potential for crash and burn whether the stack overflows or not.
Even though this sample code is extremely unlikely to overflow the stack under normal circumstances, this sample has an extreme potential for incredibly difficult to debug problems.
This simple code has the same problem.
void * s = alloca(1);
This simple example may also fail for similar reasons.
void * s1 = alloca(1);
void * s2 = alloca(1);
Of course, just because reality can be a pain, these simple examples all work differently with different implementations though when faulty they all crash and burn. With some compilers, the second and third may work fine, but with other compilers only the first and second work, and in all of those cases, the client code has no way of inspecting for such faults.
Naturally, anyone may use whatever they wish; Yog Sothoth knows I use an awful, filthy sort of hack in my libraries, but MutantJohn, you shouldn't use it without considerable effort in understanding exactly where and how support for `alloca' works.
That last bit was unnecessarily condescending, and though I in no way intended that I still do apologize. I'm sorry for that.
Let me instead put it this way: `alloca' is more difficult to implement correctly than one might think and even that is before the optimizer gets involved, so before you continue to use it, spend some time familiarizing yourself with the sins of the particular implementation you use.