diff options
Diffstat (limited to 'src/runtime/export_test.go')
| -rw-r--r-- | src/runtime/export_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go index 6a8d00c60d..67379796c7 100644 --- a/src/runtime/export_test.go +++ b/src/runtime/export_test.go @@ -975,3 +975,11 @@ func MapHashCheck(m interface{}, k interface{}) (uintptr, uintptr) { y := typehash(kt, noescape(p), uintptr(mh.hash0)) return x, y } + +func MSpanCountAlloc(bits []byte) int { + s := mspan{ + nelems: uintptr(len(bits) * 8), + gcmarkBits: (*gcBits)(unsafe.Pointer(&bits[0])), + } + return s.countAlloc() +} |
