diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-09-23 00:59:55 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-23 00:59:55 +0000 |
commit | 43ee43819bf4f2e433065def7908aa57f493f5a7 (patch) | |
tree | 87659ee64420e96ff3789ffb9d8ee71b8587df1d /pkg/buffer/safemem.go | |
parent | 3b2f12d245c6973479d5286e87355f33bada6c0f (diff) | |
parent | c0f21bb19a0ff0fd4bc3bd1f0bed9171e43faf68 (diff) |
Merge release-20200914.0-135-gc0f21bb19 (automated)
Diffstat (limited to 'pkg/buffer/safemem.go')
-rw-r--r-- | pkg/buffer/safemem.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/buffer/safemem.go b/pkg/buffer/safemem.go index b789e56e9..8b42575b4 100644 --- a/pkg/buffer/safemem.go +++ b/pkg/buffer/safemem.go @@ -44,7 +44,7 @@ func (v *View) WriteFromSafememReader(r safemem.Reader, count uint64) (uint64, e // Need at least one buffer. firstBuf := v.data.Back() if firstBuf == nil { - firstBuf = bufferPool.Get().(*buffer) + firstBuf = v.pool.get() v.data.PushBack(firstBuf) } @@ -56,7 +56,7 @@ func (v *View) WriteFromSafememReader(r safemem.Reader, count uint64) (uint64, e count -= l blocks = append(blocks, firstBuf.WriteBlock()) for count > 0 { - emptyBuf := bufferPool.Get().(*buffer) + emptyBuf := v.pool.get() v.data.PushBack(emptyBuf) block := emptyBuf.WriteBlock().TakeFirst64(count) count -= uint64(block.Len()) |