I'm far from being an expert here, but I seem to remember from Storage that we have malloc_good_size
On Thu, Apr 27, 2017 at 9:24 AM, Henri Sivonen <[email protected]> wrote: > 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 > [email protected] > https://hsivonen.fi/ > _______________________________________________ > dev-platform mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

