helpers

package
v0.0.2-0...-4ce78c8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0, Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Allocations = expvar.Int{}
	Frees       = expvar.Int{}
)

Functions

func AssertMemoryExpectation

func AssertMemoryExpectation(t *testing.T, counter expvar.Int, expected int64)

AssertMemoryAllocations 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 TestMemoryTracker

func TestMemoryTracker(ptr unsafe.Pointer, sz C.size_t, op C.rtloader_mem_ops_t)

TestMemoryTracker is the method exposed to the RTLoader for memory tracking

func TrackedCString

func TrackedCString(str string) unsafe.Pointer

ResetMemoryStats resets allocations and frees counters to zero

Types

This section is empty.

Jump to

Keyboard shortcuts

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