3 ms·
Very interesting release. The autorelease is especially noteworthy... also I worry how hard it would be to have more finegrained control over allocations, relea
by luxxuor 6y ago
Very interesting release. The autorelease is especially noteworthy... also I worry how hard it would be to have more finegrained control over allocations, releasing the memory instantly is not always the most perfomant way. In games for example big (temporary) allocations are often performed in some kind of arena buffer that gets cleared at the end of a frame (NativeArray in Unity does this) and thereby circumvents alot of unnecessary deallocating. How feasible would it be to implement such an allocator in V without losing the autorelease for the other cases?
- amedvednikov 6y agoYou are right, and V will give the developers that control. It'll be possible to use `[noautofree]` in modules and use manual memory management with or without arena allocation. Arena allocation should also work with -autofree, I don't see why not, it's just malloc() and free().