MCPcopy Create free account
hub / github.com/dispatchrun/wzprof / InuseMemory

Function InuseMemory

mem.go:42–48  ·  view source on GitHub ↗

InuseMemory is a memory profiler option which enables tracking of allocated and freed objects to generate snapshots of the current state of a program memory.

(enable bool)

Source from the content-addressed store, hash-verified

40// and freed objects to generate snapshots of the current state of a program
41// memory.
42func InuseMemory(enable bool) MemoryProfilerOption {
43 return func(p *MemoryProfiler) {
44 if enable {
45 p.inuse = make(map[uint32]memoryAllocation)
46 }
47 }
48}
49
50type memoryAllocation struct {
51 *stackCounter

Callers 1

runMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected