You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When V8 has been busy for a long while, calling getV8HeapStatistics() and getV8HeapSpaceStatistics() will experience memory leak or even crash JVM in a low chance.
Solution
Introduce sync and async modes.
Sync Mode
In sync mode, the context is purged immediately. This is the normal path without further change.
Async Mode
There are 1 global daemon thread and multiple probing threads.
Global Daemon Thread
Periodically peek a priority queue for expired context.
If the context is expired, request the context under the global lock.
If the context exists, purge the context.
If the context doesn't exist, do nothing.
Probing Thread
Register the resource under the global lock.
In the callback, request the context under the same global lock.
If the context is purged already, return immediately.
If the context is not purged, proceed to get the statistics and purge the context.
The text was updated successfully, but these errors were encountered:
Problem
When V8 has been busy for a long while, calling
getV8HeapStatistics()
andgetV8HeapSpaceStatistics()
will experience memory leak or even crash JVM in a low chance.Solution
Introduce sync and async modes.
Sync Mode
In sync mode, the context is purged immediately. This is the normal path without further change.
Async Mode
There are 1 global daemon thread and multiple probing threads.
Global Daemon Thread
Probing Thread
The text was updated successfully, but these errors were encountered: