Skip to content

buffer: release empty slices after commit (#116)#171

Merged
istio-testing merged 1 commit intoistio:release-1.5from
PiotrSikora:slices_p1-1.5
Mar 3, 2020
Merged

buffer: release empty slices after commit (#116)#171
istio-testing merged 1 commit intoistio:release-1.5from
PiotrSikora:slices_p1-1.5

Conversation

@PiotrSikora
Copy link

Description: Remove empty slices off the end of buffers after calls to OwnedImpl::commit. The slices reserved when OwnedImpl::reserve is called will sit unused in cases where the 0 bytes are commited, for example, when socket read returns 0 bytes EAGAIN. Trapped slices act like a memory leak until there is a successful read or the socket is closed.
Risk Level: low
Testing: unit
Docs Changes: n/a
Release Notes: n/a

Signed-off-by: Asra Ali asraa@google.com

Description: Remove empty slices off the end of buffers after calls to OwnedImpl::commit. The slices reserved when OwnedImpl::reserve is called will sit unused in cases where the 0 bytes are commited, for example, when socket read returns 0 bytes EAGAIN. Trapped slices act like a memory leak until there is a successful read or the socket is closed.
Risk Level: low
Testing: unit
Docs Changes: n/a
Release Notes: n/a

Signed-off-by: Asra Ali <asraa@google.com>
@PiotrSikora
Copy link
Author

/retest

@PiotrSikora PiotrSikora requested a review from howardjohn March 3, 2020 19:37
@istio-testing istio-testing merged commit 71e0608 into istio:release-1.5 Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants