leak

package
v0.0.0-...-32ebda9 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finder

type Finder struct {
	FilePaths [3]string
	Dumps     [3]*obj.Dump
	Leaks     []*string
	Verbose   bool
}

Finder helps with finding a memory leak across three different memory dumps from a Ruby process.

func NewFinder

func NewFinder(filePath1, filePath2, filePath3 string) *Finder

NewFinder returns a new *Finder instance, populated with the three given file paths.

func (*Finder) FindLeaks

func (s *Finder) FindLeaks() []*string

FindLeaks finds potential memory leaks by removing all objects in heap dump #1 from heap dump #2, and then also removing all entries from heap dump #2 which are not present in heap dump #3.

func (*Finder) PrintLeakedAddresses

func (s *Finder) PrintLeakedAddresses()

PrintLeakedAddresses prints the memory addresses in hex (0x...) format for all objects which are likely to be leaked memory.

func (*Finder) PrintLeakedObjects

func (s *Finder) PrintLeakedObjects() error

PrintLeakedObjects prints the full JSON blobs for all objects which are likely to be memory leaks.

func (*Finder) Process

func (s *Finder) Process() error

Process will will load and process each of the dump files.

Jump to

Keyboard shortcuts

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