Rolled back some stuff here like the package stuff
This will add support to view live data
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package sharedMem
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func copySlice2Ptr(b []byte, p uintptr, off int64, size uint32) int {
|
||||
bb := unsafe.Slice((*byte)(*(*unsafe.Pointer)(unsafe.Pointer(&p))), int(size))
|
||||
return copy(bb[off:], b)
|
||||
}
|
||||
|
||||
func copyPtr2Slice(p uintptr, b []byte, off int64, size uint32) int {
|
||||
bb := unsafe.Slice((*byte)(*(*unsafe.Pointer)(unsafe.Pointer(&p))), int(size))
|
||||
return copy(b, bb[off:size])
|
||||
}
|
||||
Reference in New Issue
Block a user