memory

package module
v0.0.0-...-ee826e9 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 2 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Memory

MIT License

Memory is a simple package that provides helper functions to interact with the computer's memory from go.

Example

package main

import (
	"fmt"

	"github.com/notwithering/memory"
)

func main() {
	// data you do not want to be stored into memory for long
	var info string = "my super secret password"

	// zero out the data
	memory.Zero(&info)

	// there is no data to even print
	fmt.Println(info)
}

Documentation

Overview

Package memory provides helpers functions that interact with the computer's memory from go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PointerZero

func PointerZero(data *any)

Faster than ReflectZero, might be more unstable.

func ReflectZero

func ReflectZero(data *any)

Slower than PointerZero, might be safer.

func View

func View(data *any) []byte

View the memory of data.

func Zero

func Zero(data *any)

Zeros out all data making the variable unreadable. Useful if you need to eradicate a variable from memory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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