]> Cypherpunks repositories - gostls13.git/commit
internal/poll: avoid unnecessary memory allocation in Writev
authorMatthew Dempsky <mdempsky@google.com>
Tue, 16 Apr 2019 22:52:05 +0000 (15:52 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 17 Apr 2019 00:05:41 +0000 (00:05 +0000)
commit33e5da48d5d22a722f2363b15e2d53061fb71cf4
treeff86b55ca88282b81d2cfb50a623cc488273dfcf
parentd7df9de5a2d8978351705901a9252888c7a935bb
internal/poll: avoid unnecessary memory allocation in Writev

Writev was allocating a new []syscall.Iovec every call, rather than
reusing the cached copy available at *fd.iovec.

Fixes #26663.

Change-Id: I5967b0d82dc671ce0eaf4ec36cc2a0e46eadde02
Reviewed-on: https://go-review.googlesource.com/c/go/+/172419
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/internal/poll/writev.go