如何理解这个函数中的这段代码:(*[2]unsafe.Pointer)(unsafe.Pointer(&x))[1]
func poolRaceAddr(x interface{}) unsafe.Pointer {
ptr := uintptr((*[2]unsafe.Pointer)(unsafe.Pointer(&x))[1])
h := uint32((uint64(uint32(ptr)) * 0x85ebca6b) >> 16)
return unsafe.Pointer(&poolRaceHash[h%uint32(len(poolRaceHash))])
}
有疑问加站长微信联系(非本文作者)