You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does ngx_pool_t do non-noop frees if done in LIFO order? If so, then it would also make sense for it to support in-place reallocs for the last allocation, and override the provided default methods for Allocator::grow and Allocator::shrink here as well.
Allowing the last allocation to grow in-place, even in bump allocators, is particularly nice when building Vecs of an unknown number of elements and which end up resizing and growing their underlying storage.
The approach has been used in ngx_array_push since nginx 0.1, and the underlying structures are quite stable. The optimization would be quite beneficial for building arrays and strings on pool.