aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/mheap.go2
-rw-r--r--src/runtime/stack.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/mheap.go b/src/runtime/mheap.go
index af14bf58a3..be53f7bd91 100644
--- a/src/runtime/mheap.go
+++ b/src/runtime/mheap.go
@@ -200,7 +200,7 @@ type mheap struct {
// central is indexed by spanClass.
central [numSpanClasses]struct {
mcentral mcentral
- pad [cpu.CacheLinePadSize - unsafe.Sizeof(mcentral{})%cpu.CacheLinePadSize]byte
+ pad [(cpu.CacheLinePadSize - unsafe.Sizeof(mcentral{})%cpu.CacheLinePadSize) % cpu.CacheLinePadSize]byte
}
spanalloc fixalloc // allocator for span*
diff --git a/src/runtime/stack.go b/src/runtime/stack.go
index b94a4a7249..22dc2d4748 100644
--- a/src/runtime/stack.go
+++ b/src/runtime/stack.go
@@ -157,7 +157,7 @@ const (
// There is a free list for each order.
var stackpool [_NumStackOrders]struct {
item stackpoolItem
- _ [cpu.CacheLinePadSize - unsafe.Sizeof(stackpoolItem{})%cpu.CacheLinePadSize]byte
+ _ [(cpu.CacheLinePadSize - unsafe.Sizeof(stackpoolItem{})%cpu.CacheLinePadSize) % cpu.CacheLinePadSize]byte
}
type stackpoolItem struct {