shm

package module
v0.0.0-...-2852b0d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2015 License: MIT Imports: 2 Imported by: 8

README

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())
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(regionName string, flags int, perm os.FileMode) (*os.File, error)
func Unlink(regionName string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL