Here is my code.
package main
/*
#include
#include
#include
static void memcpy_c(char *dest, int offs1, char *src, int offs2, int cnt) {
if (src == 0 || dest == 0) {
printf("a null ptr.\n");
return;
}
int a = 0;
long i = 0;
memcpy(dest + offs1, src+offs2, cnt);
while (1){
if (i >= cnt) {
break;
shmid, _, err := syscall.Syscall(syscall.SYS_SHMGET, uintptr(10001), 1<<32,
IpcCreate|0600)
data_shmaddr, _, _ := syscall.Syscall(syscall.SYS_SHMAT, shmid, 0, 0)
C.memcpy(unsafe.Pointer(data_shmaddr+uintptr(per_offs)), unsafe.Pointer((C.
CString)(string(*data))), C.ulong(len(*data)))
I'm trying t