Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #12198 #16349

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Fixes #12198 #16349

wants to merge 13 commits into from

Conversation

Jarred-Sumner
Copy link
Collaborator

What does this PR do?

Fixes #12198
Closes #16075

The usage of type: "bytes" in our lazy internal ReadableStream sources led to a memory leak because each read from the stream sometimes returns a larger & different buffer than the one the user provides.

How did you verify your code works?

The version using Node APIs uses the same amount of memory as the version using Bun/Web APIs.

Will follow up with a memory leak test once a release build is generated in CI.

@robobun
Copy link

robobun commented Jan 12, 2025

Updated 12:27 PM PT - Jan 14th, 2025

@DonIsaac, your commit af05581 has 2 failures in #9575:


🧪   try this PR locally:

bunx bun-pr 16349

@leeoniya
Copy link

totally drive-by comment, but a PR title like "Streams: Fix memory leak with type: "bytes"" would be much nicer than "Fixes #12198". does the tl;dr without clicking around for context :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streams memory leak
4 participants