diff options
Diffstat (limited to 'src/runtime/export_test.go')
| -rw-r--r-- | src/runtime/export_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go index 599ac2d84a..385c569ed8 100644 --- a/src/runtime/export_test.go +++ b/src/runtime/export_test.go @@ -377,11 +377,16 @@ func (rw *RWMutex) Unlock() { rw.rw.unlock() } -func MapBuckets(m map[int]int) int { +func MapBucketsCount(m map[int]int) int { h := *(**hmap)(unsafe.Pointer(&m)) return 1 << h.B } +func MapBucketsPointerIsNil(m map[int]int) bool { + h := *(**hmap)(unsafe.Pointer(&m)) + return h.buckets == nil +} + func LockOSCounts() (external, internal uint32) { g := getg() if g.m.lockedExt+g.m.lockedInt == 0 { |
