You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I read and write from/to a buffer in such a way that buffer's length remains bounded,
but it is never empty, the buffer's underlying byte slice will grow unboundedly.
What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
http://play.golang.org/p/SsC896Kwd- runs out of memory, instead of running out of time.
What is the expected output?
I would expect the buffer to consume a bounded and small amount of memory, as it happens
when the buffer occasionally runs dry.
I believe this problem is caused by the bytes.Buffer always allocating a larger buffer
in grow(n); even if the buffer's capacity is larger than twice the required size.
The text was updated successfully, but these errors were encountered:
by robryk:
The text was updated successfully, but these errors were encountered: