Closed Bug 1990217 Opened 1 year ago Closed 1 year ago

Move heap size accounting for nursery owned buffers into the buffer allocator

Categories

(Core :: JavaScript: GC, task, P3)

task

Tracking

()

RESOLVED FIXED
145 Branch
Tracking Status
firefox145 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

Attachments

(3 external files)

Currently heap size accounting for nursery owned buffers is done in the nursery code, and originally all buffer allocations happened on this path. In future we're going to have more uses of the buffer allocator that don't go down this path so we should move the accounting for this memory to the buffer allocator itself.

This refactors the buffer allocator code to use increase/decreaseHeapSize
methods for heap accounting internally.

Previously we the accounting for nursery owned buffers happened in the nursery
while for tenured owned buffers this happened in the buffer allocator. This
moves the accouting for nursery owned buffers to the buffer allocator.

Accounting for malloced memory still happens in the nursery.

Currently we pass an argument 'ownerWasTenured' when marking nursery owned
buffers. This is inconsitent with the 'nurseryOwned' argument which is used
everywhere else in the buffer allocator but has the opposite sense.

Refactor to use 'nurseryOwned' everywhere to make this simpler.

Pushed by jcoppeard@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/838f4172b02b https://hg.mozilla.org/integration/autoland/rev/fcc83cff5ce8 Part 1: Rename updateHeapSize to increaseHeapSize and add decreaseHeapSize r=sfink https://github.com/mozilla-firefox/firefox/commit/9b693f65bf46 https://hg.mozilla.org/integration/autoland/rev/1fbafdc07d14 Part 2: Move accounting for nursery owned buffers to the buffer allocator r=sfink https://github.com/mozilla-firefox/firefox/commit/60c934d1c0df https://hg.mozilla.org/integration/autoland/rev/b236f6ed3430 Part 3: Replace ownerWasTenured argument with nurseryOwned in the buffer allocator r=sfink
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: