func open(name string, size int32) (*shmi, error) {
	name = "/" + name
	fd := C.Open(C.CString(name), C.int(size))
	if fd < 0 {
		return nil, fmt.Errorf("open")
	}
	v := C.Map(fd, C.int(size))
	if v == nil {
		C.Close(fd, nil, C.int(size))
		C.Delete(C.CString(name))
	}
	return &shmi{name, fd, v, size, false}, nil
}
open shared memory. return shmi object.
name should not be more than 31 bytes.
package shm
import "C"
import (
	"fmt"
	"io"
	"unsafe"
)
type shmi struct {
	name   string
	fd     C.int
	v      unsafe.Pointer
	size   int32
	parent bool
}
func create(name string, size int32) (*shmi, error) {
	name = "/" + name
	fd := C.Create(C.CString(name), C.int(size))
	if fd < 0 {
		return nil, fmt.Errorf("create")
	}
	v := C.Map(fd, C.int(size))
	if v == nil {
		C.Close(fd, nil, C.int(size))
		C.Delete(C.CString(name))
	}
	return &shmi{name, fd, v, size, true}, nil
}