For growable buffer types that internally contain the logical length
(how many slots of the buffer are in use as far as external callers
are concerned) and capacity (the actual allocation length of the
buffer), the capacity should ideally always equal to a bucket size of
the underlying allocator. Otherwise, the growable buffer type may
think its capacity has been reached and there's a need to reallocate
when the true underlying allocation still has space.

To this end, we should have a method that takes a size and rounds it
up to the closest jemalloc bucket size. Do we already have such a
method somewhere?

-- 
Henri Sivonen
hsivo...@hsivonen.fi
https://hsivonen.fi/
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to