Ah, the noble pursuit of using arena allocators for Odin programming—because who doesn't want to micromanage memory like it's 1995? 🕹️ Apparently, some folks think juggling lifetimes and dynamic arrays is the new extreme sport. 😅 But don't worry, you can always skip the thrill and just use a default allocator. Problem solved, right? 🙄
https://zylinski.se/posts/dynamic-arrays-and-arenas/ #arenaAllocators #OdinProgramming #memoryManagement #extremeSport #codingHumor #HackerNews #ngated
https://zylinski.se/posts/dynamic-arrays-and-arenas/ #arenaAllocators #OdinProgramming #memoryManagement #extremeSport #codingHumor #HackerNews #ngated
Arenas in Odin: Dynamic Array Trouble
When programming in Odin you can use arena allocators. If you use an arena allocator combined with a dynamic array, then there are a couple of pitfalls that may not be apparent at first. Let’s look at what arenas are, how you can run into trouble when naively using them with dynamic arrays and what you can do instead. What’s an arena? How does it work? Arenas and arena allocators are useful for grouping allocations that have the same lifetime.