[Webkit-unassigned] [Bug 194268] Safari does not free ArrayBuffers being transferred from webworker to main thread

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 3 19:02:40 PDT 2019


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

Dean Jackson <dino at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #4 from Dean Jackson <dino at apple.com> ---
I spent a fair bit of time on this and think the issue is fixed, at least on tip-of-tree.

Attached two test cases I made (modifications to the one linked above). They allocate some ArrayBuffers in the worker, and then transfer them to the main thread via postMessage. The main thread only keeps references to a small number of buffers.

The allocation timeline in the Web Inspector shows garbage collection triggering, and only a fixed number of ArrayBuffers being retained (the ones I'm keeping a reference to).

I also tried with Instruments and the Allocations widget. It also showed that while a large number of ArrayBuffers were created, they were all reclaimed over time.

Lastly I put printf statements in JavaScriptCore for ArrayBuffer's constructor and destructor. Each of the large ArrayBuffers allocated in the Worker was eventually reclaimed (and very soon after the references were dropped, because they were taking up a lot of memory).

[Side note: I was not sure if it should be "each... was" or "each were". Most resources say "was" (s), but many say "were" (pl) is acceptable too.]

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190404/d95d0340/attachment.html>


More information about the webkit-unassigned mailing list