Open Bug 1739010 Opened 3 years ago Updated 3 years ago

"Musical chairs" zeal mode for malloc memory

Categories

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

enhancement

Tracking

()

People

(Reporter: sfink, Unassigned)

References

(Blocks 1 open bug)

Details

We could have a compacting zeal mode that intentionally moves everything around in memory on every GC.

We already move everything for zeal mode shrinking GCs, unless there's something more we can do:

https://searchfox.org/mozilla-central/source/js/src/gc/Compacting.cpp#132-134

(In reply to Jon Coppeard (:jonco) from comment #1)

We already move everything for zeal mode shrinking GCs, unless there's something more we can do:

Oh, you're right. At one of our meetings, maybe a month or two ago, we discussed something called "musical chairs" zeal mode and you asked me to file a bug for it. I stumbled across a note telling me to file the bug, but I couldn't remember exactly what it was about.

I think I remember. I think this was for moving around malloc memory hanging off of GC things. In particular, I think it came up in the context of strings and/or ArrayBuffer data. Gecko does some sketchy stuff with stashing away ArrayBuffer data pointers, and might be getting away with it most of the time because 99% of the time it's a tenured, non-inline ABO.

Summary: "Musical chairs" zeal mode → "Musical chairs" zeal mode for malloc memory

(In reply to Steve Fink [:sfink] [:s:] from comment #2)

I think I remember. I think this was for moving around malloc memory hanging off of GC things. In particular, I think it came up in the context of strings and/or ArrayBuffer data. Gecko does some sketchy stuff with stashing away ArrayBuffer data pointers, and might be getting away with it most of the time because 99% of the time it's a tenured, non-inline ABO.

Good idea! I had forgotten about this.

Severity: -- → N/A
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.