logoalt Hacker News

laserbeamtoday at 4:04 AM1 replyview on HN

I imagine it would be straightforward to support this for codebases which already define multiple allocators (game engines, programs written in zig, bunch of other examples I’m less familiar with). If you’re already in memory management land you already you already have multiple implementations of malloc and free. Adding more of them is trivial.

If you’re not in manual memory management land, then you probably don’t care about this optimization just like you barely think of stack vs heap. Maybe the compiler could guess something for you, but I wouldn’t be worrying about it in that problem space.


Replies

doogliustoday at 4:13 AM

I'm totally in manual memory management land. But it's very difficult for me to think of a case where time-limited retention is something I'd feel safe with, and with limited-endurance memory I'd worry about wearing it out with iterating or debugging.