mem

package
v0.0.0-...-9bd9f91 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package mem declares functions for allocating memory that is aligned to specific byte boundaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alloc32Align

func Alloc32Align[T any]() *T

Alloc32Align returns a pointer to a value of type T that is aligned to 32 bytes. The returned pointer may point to additional unused memory to ensure alignment.

func Alloc64Align

func Alloc64Align[T any]() *T

Alloc64Align returns a pointer to a value of type T that is aligned to 64 bytes. The returned pointer may point to additional unused memory to ensure alignment.

func Alloc64ByteAligned

func Alloc64ByteAligned(size uintptr) []byte

Alloc64ByteAligned returns a byte slice of the specified size that is aligned to 64 bytes. The returned slice may have additional unused capacity to ensure alignment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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