Comment by 201984
4 days ago
Arenas would be a better fit for a webserver. Allocations are basically free and everything gets deallocated all at once, so having one arena per active request and resetting it between requests can give very high performance.
Using alloca will result in stack overflows if you use more than a couple megabytes, so it isn't a very good idea.
Those buffers are tiny and they won't result in stack overflows because the whole thing is single threaded, it is beginner level code.