memtest

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 2 Imported by: ? modules, 0 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

Overview

Package memtest provides allocators for tests that fail the test on a leak.

Index

Constants

View Source
const GuardedQuarantine = 64 << 20

GuardedQuarantine is the quarantine budget of the allocators Guarded returns.

Variables

This section is empty.

Functions

func Guarded added in v0.6.0

func Guarded(t testing.TB) *memory.Guarded

Guarded is Local for a memory.Guarded allocator with a quarantine of GuardedQuarantine bytes, so a use after free or an overrun faults at the point of the mistake. Run a suite on it to find what the other allocators cannot catch.

func Local

func Local(t testing.TB) *memory.Local

Local returns an allocator that fails t if anything allocated from it is still live when t ends, and closes it.

func Shared

func Shared(t testing.TB) *memory.Shared

Shared is Local for a Shared allocator.

Types

This section is empty.

Jump to

Keyboard shortcuts

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