mem

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyOverlap

func AnyOverlap(x, y []byte) bool

AnyOverlap reports whether x and y share memory at any (not necessarily corresponding) index. The memory beyond the slice length is ignored.

func Clear

func Clear(p unsafe.Pointer, sz uintptr)

func Equal

func Equal(p, q unsafe.Pointer, sz uintptr) bool

func InexactOverlap

func InexactOverlap(x, y []byte) bool

InexactOverlap reports whether x and y share memory at any non-corresponding index. The memory beyond the slice length is ignored. Note that x and y can have different lengths and still not have any inexact overlap.

InexactOverlap can be used to implement the requirements of the crypto/cipher AEAD, Block, BlockMode and Stream interfaces.

func Move

func Move(dst, src unsafe.Pointer, sz uintptr)

func ReadUnaligned32

func ReadUnaligned32(p unsafe.Pointer) uint32

func ReadUnaligned64

func ReadUnaligned64(p unsafe.Pointer) uint64

func TypedMove

func TypedMove(typ *abi.Type, dst, src unsafe.Pointer)

TypedMove copies a value of type typ to dst from src. Must be nosplit, see #16026.

TODO: Perfect for go:nosplitrec since we can't have a safe point anywhere in the bulk barrier or Move.

See ${GOROOT}/src/runtime/mbarrier.go#func:typedmemmove

Types

This section is empty.

Jump to

Keyboard shortcuts

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