memutil

package
v0.0.0-...-f7ad032 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0, MIT Imports: 4 Imported by: 21

Documentation

Overview

Package memutil provides utilities for working with shared memory files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMemFD

func CreateMemFD(name string, flags int) (int, error)

CreateMemFD creates a memfd file and returns the fd.

func MapFile

func MapFile(addr, size, prot, flags, fd, offset uintptr) (uintptr, error)

MapFile returns a memory mapping configured by the given options as per mmap(2).

func MapSlice

func MapSlice(addr, size, prot, flags, fd, offset uintptr) ([]byte, error)

MapSlice is like MapFile, but returns a slice instead of a uintptr.

func UnmapSlice

func UnmapSlice(slice []byte) error

UnmapSlice unmaps a mapping returned by MapSlice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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