MemDist returns the distance between two unsafe pointer.
(p1 unsafe.Pointer, p2 unsafe.Pointer)
| 23 | |
| 24 | // MemDist returns the distance between two unsafe pointer. |
| 25 | func MemDist(p1 unsafe.Pointer, p2 unsafe.Pointer) int64 { |
| 26 | return int64(uintptr(p1) - uintptr(p2)) |
| 27 | } |
| 28 | |
| 29 | // MemEqual performs byte to byte comparison. |
| 30 | func MemEqual(a unsafe.Pointer, b unsafe.Pointer, bytes int) bool { |
no outgoing calls
no test coverage detected