MemAccess access memory location with starting pointer and an offset.
(p unsafe.Pointer, offset int)
| 18 | |
| 19 | // MemAccess access memory location with starting pointer and an offset. |
| 20 | func MemAccess(p unsafe.Pointer, offset int) unsafe.Pointer { |
| 21 | return unsafe.Pointer(uintptr(p) + uintptr(offset)) |
| 22 | } |
| 23 | |
| 24 | // MemDist returns the distance between two unsafe pointer. |
| 25 | func MemDist(p1 unsafe.Pointer, p2 unsafe.Pointer) int64 { |
no outgoing calls