internal/poll: improve the padding calculation inside struct splicePipe

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>
diff --git a/src/internal/poll/splice_linux.go b/src/internal/poll/splice_linux.go
index 6869a40..2d87c3d 100644
--- a/src/internal/poll/splice_linux.go
+++ b/src/internal/poll/splice_linux.go
@@ -154,14 +154,18 @@
 	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.
@@ -222,7 +226,7 @@
 		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)