4 ms·
> Object pools at the language level would be an alternative. (I.e. every object is allocated in a "pool", including pools. When a pool falls out of scope the e
by Dewie 12y ago
> Object pools at the language level would be an alternative. (I.e. every object is allocated in a "pool", including pools. When a pool falls out of scope the entire pool is "freed". You can copy objects between pools as necessary.)
This might be called "memory regions" in the literature, or at least the work on using this memory management scheme in an ML (ML Kit).
- nostrademons 12y agoAlso related to arenas - the main difference is that an arena is a block region of memory from which different-sized objects are allocated, while a pool is a collection of same-sized objects. Both are pretty common techniques in C, C++, and Ada, and pools are common in high-performance Java.