[Webkit-unassigned] [Bug 89111] Heap::shouldCollect() should return true when system memory is low

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 15 07:30:15 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=89111





--- Comment #7 from Yong Li <yoli at rim.com>  2012-06-15 07:30:14 PST ---
(In reply to comment #6)
> > Especially now the GC threshold can be as big as 32MB.

> 
> > However if webkit thread is busy in executing JS (very often), it probably cannot get a chance to do anything before the crash. 
> 
> Is this a real problem or a theoretical problem that you're trying to solve?

Honestly it is still a theoretical one. I've seen a real problem that JS execution continues running to OOM (Bug 79555). That was fixed by making JSString report actual memory cost, so JS engine collects garbage in time before exhausting all memory. When system is under memory pressure though, a 32MB waste in the heap can lead to the similar situation: JSString does report memory cost but the total allocated bytes is below the limit, so no GC happens.

> 
> If the 32MB isn't appropriate for your platform, don't use it.

That means another #if PLATFORM() in Heap.cpp, right? I've noticed large heap size speeds up page load significantly. However system memory status can change quickly on a mutli-tasking OS. A dynamic threshold will be better. If no objection, I can work on a patch for that.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list