Summary: | [BlackBerry] GC in didAllocate() isn't safe | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yong Li <yong.li.webkit> | ||||||
Component: | WebKit BlackBerry | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED LATER | ||||||||
Severity: | Normal | CC: | fpizlo, ggaren, oliver, rwlbuis, tonikitoo, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Yong Li
2012-06-19 09:51:09 PDT
Created attachment 148578 [details]
proposed patch
I know this is a bit ugly. Any suggestions about how to hack this neatly?
For example, can I add an argument to GCActivityCallback::didAllocate() indicating it is safe to trigger GC?
Attachment 148578 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1
Source/JavaScriptCore/runtime/GCActivityCallback.h:53: Missing space inside { }. [whitespace/braces] [5]
Total errors found: 1 in 4 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 150786 [details]
fix style
Comment on attachment 150786 [details]
fix style
Why is this necessary?
(In reply to comment #4) > (From update of attachment 150786 [details]) > Why is this necessary? This is a follow-up of https://bugs.webkit.org/show_bug.cgi?id=89236. The initial idea is use small heap size when system is under memory pressure. I ended up with putting platform-specific GC policy in GCActivityCallback. However I found it isn't safe to do GC in didAllocate. The only place it makes sense and is safe to collect garbage is reportExtraMemoryCost. Any JSC folks want to review this? |