aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mgcsweep.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/mgcsweep.go')
-rw-r--r--src/runtime/mgcsweep.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/mgcsweep.go b/src/runtime/mgcsweep.go
index 8fe3a65340..468df4d097 100644
--- a/src/runtime/mgcsweep.go
+++ b/src/runtime/mgcsweep.go
@@ -581,7 +581,7 @@ func (sl *sweepLocked) sweep(preserve bool) bool {
// free slots zeroed.
s.needzero = 1
stats := memstats.heapStats.acquire()
- atomic.Xadduintptr(&stats.smallFreeCount[spc.sizeclass()], uintptr(nfreed))
+ atomic.Xadd64(&stats.smallFreeCount[spc.sizeclass()], int64(nfreed))
memstats.heapStats.release()
}
if !preserve {
@@ -628,8 +628,8 @@ func (sl *sweepLocked) sweep(preserve bool) bool {
mheap_.freeSpan(s)
}
stats := memstats.heapStats.acquire()
- atomic.Xadduintptr(&stats.largeFreeCount, 1)
- atomic.Xadduintptr(&stats.largeFree, size)
+ atomic.Xadd64(&stats.largeFreeCount, 1)
+ atomic.Xadd64(&stats.largeFree, int64(size))
memstats.heapStats.release()
return true
}