Closed Bug 802662 Opened 12 years ago Closed 12 years ago

[B2G] Tweak GC heuristics so that we collect screenshot objects more often

Categories

(Core :: JavaScript Engine, defect)

ARM
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 809587
blocking-basecamp +

People

(Reporter: justin.lebar+bug, Unassigned)

References

Details

Right now, unreachable screenshot objects are left around in B2G processes for a long time.

This is problematic, because these objects are quite large.

I see two ways for us to fix this problem.

a) Tweak the GC heuristics so we GC more often (under the right circumstances), thus freeing these objects.

b) Add low-memory notifications to B2G and GC when we get one of these.

I'd prefer (b) over than blindly turning dials in the JS engine.  But in my experience, low-memory notifications are also hard to get right.  You have to fire them at just the right time -- too early and you waste effort dropping memory, too late and you OOM and die.

So I suspect we're going to want to do a little of both (a) and (b).  How much of each probably depends on how easy it is to tune the GC heuristics here and conversely how easy it is to get good low-memory notifications.  I'll file a bug for (b) in a moment.
> I'll file a bug for (b) in a moment.

bug 802665.
This seems to be the perfect use-case for a per-compartment GC.

BTW what's the deal now with low-memory notifications? Is there a bug, do we already receive them, or ....?
798002 blocks, so should this.
blocking-basecamp: --- → +
Do we update the malloc counter via JS_updateMallocCounter when we generate screenshots?
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.