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

zero memery padding on stream split, fix potential OOM issues. #233

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

0xbillw
Copy link
Contributor

@0xbillw 0xbillw commented Jan 17, 2023

Hello author!
OOM occurred when I used stream-encoder for a large file (greater than 10G).
After investigation, I found that the actual memory allocation is used when zero padding in stream.Split() method.
I think this can be optimized to zero memory used and directly written to the target.
Welcome to correct me, thank you!

Copy link
Owner

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@klauspost klauspost merged commit 6580cd4 into klauspost:master Jan 17, 2023
@klauspost
Copy link
Owner

Thanks for the contribution!

@0xbillw 0xbillw deleted the stream_split_oom branch January 18, 2023 01:57
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.

None yet

3 participants