Skip to content

fabiokung/shm

Repository files navigation

POSIX shared memory

Portable across (most?) UNIX flavors: linux, freebsd and darwin currently.

Usage

package main

import (
	"os"

	"github.com/fabiokung/shm"
)

func main() {
	file, err := shm.Open("my_region", os.O_RDRW|os.O_CREATE, 0600)
	if err != nil {
		panic(err)
	}
	// syscall.Ftruncate if new, etc
	defer file.Close()
	defer shm.Unlink(file.Name())
}

About

Golang POSIX shared memory library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages