aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/map_fast64.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/map_fast64.go')
-rw-r--r--src/runtime/map_fast64.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/map_fast64.go b/src/runtime/map_fast64.go
index 3bc84bbdd3..f1368dc774 100644
--- a/src/runtime/map_fast64.go
+++ b/src/runtime/map_fast64.go
@@ -114,7 +114,7 @@ again:
if h.growing() {
growWork_fast64(t, h, bucket)
}
- b := (*bmap)(unsafe.Pointer(uintptr(h.buckets) + bucket*uintptr(t.bucketsize)))
+ b := (*bmap)(add(h.buckets, bucket*uintptr(t.bucketsize)))
var insertb *bmap
var inserti uintptr
@@ -158,7 +158,7 @@ bucketloop:
}
if insertb == nil {
- // all current buckets are full, allocate a new one.
+ // The current bucket and all the overflow buckets connected to it are full, allocate a new one.
insertb = h.newoverflow(t, b)
inserti = 0 // not necessary, but avoids needlessly spilling inserti
}
@@ -204,7 +204,7 @@ again:
if h.growing() {
growWork_fast64(t, h, bucket)
}
- b := (*bmap)(unsafe.Pointer(uintptr(h.buckets) + bucket*uintptr(t.bucketsize)))
+ b := (*bmap)(add(h.buckets, bucket*uintptr(t.bucketsize)))
var insertb *bmap
var inserti uintptr
@@ -248,7 +248,7 @@ bucketloop:
}
if insertb == nil {
- // all current buckets are full, allocate a new one.
+ // The current bucket and all the overflow buckets connected to it are full, allocate a new one.
insertb = h.newoverflow(t, b)
inserti = 0 // not necessary, but avoids needlessly spilling inserti
}