Skip to content

deps: V8: cherry-pick c172ffc5bf54#57437

Merged
aduh95 merged 1 commit intonodejs:mainfrom
tunamagur0:retained-map-increase
Mar 16, 2025
Merged

deps: V8: cherry-pick c172ffc5bf54#57437
aduh95 merged 1 commit intonodejs:mainfrom
tunamagur0:retained-map-increase

Conversation

@tunamagur0
Copy link
Contributor

fix: #57412

This upstream V8 commit fixes the issue where the size of RetainedMaps continuously increases, leading to higher memory usage.

This issue has been occurring since AddRetainedMap was changed to AddRetainedMaps in the commit d8c97e48573ef9679751be0c7a308e08d0101c47.

As a result, the Main branch, v23.x.x, and v22.x.x should need this.

Original commit message:

Compact retained maps array more often

When we add maps to the retained maps array, we compacted the array if
it's full. But, since we are now adding maps in a batch, it's unlikely
to meet the condition. Thus, update the condition to check whether new
size exceeds the capacity.

Bug: 398528460
Change-Id: I89caa47b69532c6397596edfe5caf7c7d24768cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6330019
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#99163}

Refs: v8/v8@c172ffc

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory leak due to increasing RetainedMaps size in V8 (Fixed upstream)

7 participants