Bug 262290
| Summary: | Expose a way to report when extra memory in old region has increased in size | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jarred Sumner <jarred> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | mark.lam, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Jarred Sumner
Say you have a long-running task that writes to dynamically-sized non-GC'd buffers. Those buffers may increase in size after the parent cell moves from eden -> old space. This size increase would not be reported to the GC, causing extra memory to be under-reported to the GC.
The pattern of calling Heap::reportExtraMemoryAllocated and Heap::reportExtraMemoryVisited doesn't quite work for this case because the allocated size is dynamic.
Concrete example: streaming an HTTP response body. Each write from JS might have a delay and might need to be buffered. If the buffer doesn't have enough space, the buffer will grow, but the memory growth won't be reported to the garbage collector since the memory growth happened in native code after the initial allocation.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/116512291>