logoalt Hacker News

Panzerschrekyesterday at 7:04 PM2 repliesview on HN

I think it's a reasonable price to have your own containers (vector/unique_ptr replacements), if you wish to use a non-standard approach for memory allocation. Many people do this, like Qt with QVector.

But do you really need arenas? Does doing allocations in a traditional way creates a bottleneck in your specific use-case? Or you just want to justify broad manual memory management (with its bugs and secure vulnerabilities) in hope to gain (or not) a tiny amount of extra performance?


Replies

eskayesterday at 7:11 PM

Respectfully, you do not seem to understand this topic well. If the C++ standard library design abstracted memory allocation correctly, you’d still be able to use containers and algorithms and not even notice that their allocation strategy uses the heap, stack, a bump allocator, a pool, etc

show 3 replies
deburoyesterday at 7:09 PM

Isn't using Arena just simplifying memory management, thereby reducing the amount of bugs as well?

show 1 reply