Status: Untriaged
Owner: [email protected]
CC: [email protected],  [email protected]

New issue 4392 by [email protected]: TurboFan/asm.js memory not immediately released
https://code.google.com/p/v8/issues/detail?id=4392

Investigating Unity failures to load in Chrome, I noticed that the following appears to happen:

1. asm.js code is compiled eagerly in TurboFan, reaching 1.1 GB
2. The game then starts to run, allocating a large typed array, etc., further increasing memory to 1.7 GB
3. Then memory decreases back to around 1.0 GB

When I manually separate the asm.js code into a separate script tag, and load the rest of the code (that allocates the large typed array, etc.) after a delay - a setTimeout of 1ms seems sufficient - then instead I see the 1.1 GB of compilation go down, then when the game starts to run, memory increases but it never passes the 1.1 GB point, avoiding the 1.7 GB spike.

Perhaps is the separation + delay enough to run the event loop or something else that leads to a collection of some temporary memory used by TurboFan? If so, I wonder if it might make sense to immediately release all that memory when compilation concludes (force a GC, if it's GC-allocated, or something like that)?

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to