Closed Bug 1862378 Opened 1 year ago Closed 1 year ago

Changes to mozjemalloc's committed memory calculation

Categories

(Core :: Memory Allocator, task)

task

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: pbone, Assigned: pbone)

References

Details

Attachments

(3 files, 1 obsolete file)

As I was working on Bug 1857841 I kept hitting assertions with the amount of committed memory. So I added more assertions to catch problems sooner and made other changes to committed memory to make sure it was correct.

I wrote this to help me with debugging. I was finding that the committed
memory would end up larger than the mapped memory when jemalloc_stats() was
called. To figure out why I added this counter to each chunk and check that
it remains in bounds and that when we dispose the chunk that it returns to
0.

It's only build when MOZ_DEBUG is defined

Depends on D192447

The waste memory calcuation has an invariant that we can also assert.

Depends on D192448

Don't include the chunk guard pages in our committed memory calculation.

Depends on D192449

Attachment #9361380 - Attachment description: Bug 1862378 - add assertion for waste calculation r=glandium → Bug 1862378 - Add assertion for waste calculation r=glandium
Attachment #9361379 - Attachment is obsolete: true
Pushed by pbone@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a34246d067fa Simplify some ifdef conditions r=glandium https://hg.mozilla.org/integration/autoland/rev/d41876c49d2d Add assertion for waste calculation r=glandium https://hg.mozilla.org/integration/autoland/rev/81c46dfe35a0 Chunk guard pages are not committed memory r=glandium
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: