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

Reset bytes.Buffer before returning it to sync.Pool #448

Merged
merged 1 commit into from
Sep 8, 2021

Commits on Sep 3, 2021

  1. Reset bytes.Buffer before returning it to sync.Pool

    Most of bytes.Buffer in stargz-snapshotter is unbounded in terms of
    size and sync.Pool's Get may choose to ignore the pool.
    
    Resizing a buffer before returning to the pool may alleviate the
    snapshotter's memory utilization issue.
    
    golang/go#23199 has a long discussion about
    the issue.
    
    Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
    kzys committed Sep 3, 2021
    Configuration menu
    Copy the full SHA
    0294e15 View commit details
    Browse the repository at this point in the history