Open Bug 1399695 Opened 7 years ago Updated 1 year ago

Reduce the overhead from sub-page allocations

Categories

(Core :: Memory Allocator, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: glandium, Assigned: glandium)

References

Details

See https://hg.mozilla.org/integration/autoland/rev/d9efe6d06931

When allocating e.g. one buffer of size between 1024 and 2048, we're creating a run of size 132KiB, which can end up wasting address space. One buffer of size between 512 and 1024 triggers the creation of a run of size 64KiB, which is similarly wasteful.

This may or may not treated in this particular bug, but generally speaking size classes above (and including) 96 are creating runs larger than one page, which may or may not be a problem in practice.

64KiB and 132KiB, especially when doing only one allocation in the given sub-page size class, is particularly wasteful, especially considering allocating a buffer between 2048 and 4096 will only allocate exactly one page, so ironically, allocating more can actually allocate less.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.