diff options
Diffstat (limited to 'src/runtime/map_fast32.go')
-rw-r--r-- | src/runtime/map_fast32.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/map_fast32.go b/src/runtime/map_fast32.go index d80f5eac78..8d52dad217 100644 --- a/src/runtime/map_fast32.go +++ b/src/runtime/map_fast32.go @@ -114,7 +114,7 @@ again: if h.growing() { growWork_fast32(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_fast32(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 } |