rawmap

package module
v0.0.0-...-5f235dc Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2018 License: MIT Imports: 3 Imported by: 0

README

rawmap

Build Status Build status Report Status

Copyright 2017- Tatsuhiro Aoshima (hiro4bbh@gmail.com).

Abstract

Package rawmap provides memory-mapped file functionalities.

See documents on GoDoc for details.

Documentation

Overview

Package rawmap provides memory-mapped file functionalities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MmapShared

func MmapShared(file *os.File, start, length int, protmode ProtectionMode) ([]byte, error)

MmapShared returns the byte slice to the region of the memory-mapped file with the specified protection mode.

func Munmap

func Munmap(b []byte) error

Munmap unmaps the memory-mapped file pointed by the byte slice b.

Types

type ProtectionMode

type ProtectionMode int

ProtectionMode is the type for supported protection modes.

const (
	PROTMODE_READONLY ProtectionMode = iota
	PROTMODE_READWRITE
)

The list of supported protection modes.

func (ProtectionMode) OpenFlag

func (protmode ProtectionMode) OpenFlag() int

OpenFlag returns the corresponding flag used in os.OpenFile.

type Slice

type Slice struct {
	Addr     uintptr
	Len, Cap int
}

Slice is the data structure used in golang runtime.

Jump to

Keyboard shortcuts

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