Memory Allocation Strategies
Discussions revolve around the performance costs of heap allocations, garbage collection pauses, and alternatives like arenas, stack allocation, object pools, and manual management in languages such as Rust, C++, Java, and Go.
Activity Over Time
Top Contributors
Keywords
Sample Comments
You can make your allocations faster if you don't have to worry about deallocation. Could be a performance thing.
Aren't allocations themselves pretty expensive regardless of GC?
Allocations don't have to be expensive if your GC is smart. Smart as C++ destructors positioning :D
In my experience: Allocation is OK, but garbage collection is bad.
Garbage collected allocation is coming. There's even an rfc I think. Manishearth is working gon it
The lack of heap allocations is great! Thanks for the pointers.
Contemporary allocators make allocation cheap. Not sure how GC is any better at fragmentation.
I bet in 99% of cases using such structure is a nonsense overhead, and in 85% the code relaying on it can be written without a single heap allocation.
Doesn't dynamic allocation expose you to memory fragmentation or other non-deterministic phenomenons?
Garbage collection vs stack allocation