3 ms·
> and because malloc/free don't enjoy the bump-allocator style happy case that is used in generational GC's nursery objects. Performance-optimized use of mallo
by 0815test 8y ago
> and because malloc/free don't enjoy the bump-allocator style happy case that is used in generational GC's nursery objects.
Performance-optimized use of malloc and free involves using custom suballocators (often called simply "allocators" within user code) which are tailored to the "happy cases" that you know about in your code. A "nursery" of objects that can be bump-allocated and then freed in a single operation is known in this context as an arena/region, and you absolutely can exploit this pattern as part of using malloc/free.