helpers

package
v0.0.0-...-e70f483 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 2 modules, 10 packages

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.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Allocations tracks number of memory allocations
	Allocations atomic.Uint64
	// Frees tracks number of memory frees
	Frees atomic.Uint64
)

Functions

func AssertMemoryExpectation

func AssertMemoryExpectation(t *testing.T, counter atomic.Uint64, expected uint64)

AssertMemoryExpectation makes sure the allocations match the provided value

func AssertMemoryUsage

func AssertMemoryUsage(t *testing.T)

AssertMemoryUsage makes sure the allocations and frees match

func InitMemoryTracker

func InitMemoryTracker()

InitMemoryTracker initializes RTLoader memory tracking

func ResetMemoryStats

func ResetMemoryStats()

ResetMemoryStats resets allocations and frees counters to zero

func TrackedCString

func TrackedCString(str string) unsafe.Pointer

TrackedCString returns an allocation-tracked pointer to a string

Types

This section is empty.

Jump to

Keyboard shortcuts

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