3 ms·
I feel like this article goes in the typical trap - you either do fully manual malloc/free, or stop-the-world mark&sweep. But that's like extremes on the spectr
by viraptor 11y ago
I feel like this article goes in the typical trap - you either do fully manual malloc/free, or stop-the-world mark&sweep. But that's like extremes on the spectrum. What about arena allocators (in dynamic content for example per-scene and per-frame). What about selective refcounting. What about mixing systems in various heaps. What about lightweight processes with own, well adjusted local heap size. There are so many options available in real world. GC is not Java, and Java also works against a good GC with the lack of value types.
- PDoyle 11y agoI'm the author of the article, and I agree 100% with you: there are definitely application-specific memory management schemes that beat both malloc and automatic GC. In fact, I'm working on one right now: it's a way of storing a huge balanced tree data structure in arrays to save space.