sys

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GcSize = 50 << 20 //默认50MB
)

Variables

This section is empty.

Functions

func BlockBySignal

func BlockBySignal()

func BlockBySignalAndCancel

func BlockBySignalAndCancel(cancel context.CancelFunc, duration time.Duration)

func ManualGC added in v1.0.1

func ManualGC()

ManualGC 手动释放堆中准备重用的一些内存

func RunCPUProfile added in v1.0.1

func RunCPUProfile() func()

RunCPUProfile Run starts up stuff at the beginning of a main function, and returns a function to defer until the function completes. It should be used like this:

func main() {
  defer sys.RunCPUProfile()()
  ... stuff ...
}

func RunMemProfile added in v1.0.1

func RunMemProfile() func()

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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