"alloca" vs "placement new"
WHAT?!
For most time, we use malloc
or new
for memory allocation, which will get it on heap.
However, access memory on heap is not as effective as the memory on stack, because the heap is "free-floating region of memory". To the contrary, memory on stack is managed by CPU …
more ...