2 ms·
Heap is a centralized resource. Each allocation/free will have to acquire/release lock. It's much more costly than stack allocation/deallocation. You might get
by stensal 8y ago
Heap is a centralized resource. Each allocation/free will have to acquire/release lock. It's much more costly than stack allocation/deallocation. You might get more efficient machine code, but using heap will likely cost more.
Hope this clarify what I meant your idea will make C like Java.