nocache

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package nocache allows to allocate variables and slices of arbitrary type in the DMA-capable non-cached memory. The allocation is permanent (there is no way to free allocated memory).

The size of the non-cached memory is MCU specific (256 KB in STM32H743).

If the MCU doesn't use data cache and there is no other memory available in the system then normal heap allocation is used.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeSlice

func MakeSlice[T any](align uintptr, len, cap int) (slice []T)

MakeSlice works like make([]T, len, cap) but guarantees that the returned slice has the given alignmet. Align must be a power of two.

func New

func New[T any](align uintptr) (ptr *T)

New works like new(T) but guarantees that the allocated variable has the given alignmet. Align must be a power of two.

Types

This section is empty.

Jump to

Keyboard shortcuts

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