Bug 293150
| Summary: | Report extra memory usage to JavaScriptCore from the Model Element | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Aleksei Marchenko <aleksei> |
| Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Aleksei Marchenko
Additional memory used outside of GC or Web Process has to be reported via reportExtraMemoryAllocated/SlotVisitor::reportExtraMemoryVisited/SlotVisitor::reportExternalMemoryVisited JSC APIs. That should help GC to prioritize heavier objects.
A good example is HTMLCanvasElement (CanvasBase).
in IDL:
[
ReportExtraMemoryCost,
ReportExternalMemoryCost,
]
In C++:
size_t memoryCost() const;
size_t externalMemoryCost() const;
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Aleksei Marchenko
<rdar://problem/143763757>
Aleksei Marchenko
Pull request: https://github.com/WebKit/WebKit/pull/45516
EWS
Committed 295220@main (910c6466a03f): <https://commits.webkit.org/295220@main>
Reviewed commits have been landed. Closing PR #45516 and removing active labels.