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
{{ message }}
Repository navigation
Commit 4b61a3d
Browse filesBrowse the repository at this point in the historyBrowse files
Report wrappables' shallow size to V8 as external memory
V8 sees a JSG object only as its small CppgcShim, so a loop that creates
and drops API objects gives V8 no reason to run a major GC, and the C++
objects pile up until one runs.
Behind the WRAPPABLE_EXTERNAL_MEMORY autogate, charge each Wrappable its
jsgGetMemorySelfSize() once when it is first bound to an isolate, and
release it when it is destroyed. Both happen under that isolate's lock,
so the total is a plain per-isolate integer. It is reported to V8 in
64 KB batches from attachWrapper() and lock acquisition, never during GC.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments