Updates #48968 and CL 358114
Change-Id: Ic68b4c5420c1c32f78b56874b53d717fa9af1f74
Reviewed-on: https://go-review.googlesource.com/c/go/+/358734
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
return int(n), err
}
-type splicePipe struct {
+type splicePipeFields struct {
rfd int
wfd int
data int
+}
+
+type splicePipe struct {
+ splicePipeFields
// We want to use a finalizer, so ensure that the size is
// large enough to not use the tiny allocator.
- _ [24 - 3*unsafe.Sizeof(int(0))]byte
+ _ [24 - unsafe.Sizeof(splicePipeFields{})%24]byte
}
// splicePipePool caches pipes to avoid high-frequency construction and destruction of pipe buffers.
return nil
}
- sp = &splicePipe{rfd: fds[0], wfd: fds[1]}
+ sp = &splicePipe{splicePipeFields: splicePipeFields{rfd: fds[0], wfd: fds[1]}}
if p == nil {
p = new(bool)