MCPcopy
hub / github.com/google/gvisor / MemoryEvents

Struct MemoryEvents

pkg/sentry/kernel/memevent/memory_events.go:41–54  ·  view source on GitHub ↗

MemoryEvents describes the configuration for the global memory event emitter.

Source from the content-addressed store, hash-verified

39
40// MemoryEvents describes the configuration for the global memory event emitter.
41type MemoryEvents struct {
42 k *kernel.Kernel
43
44 // The period is how often to emit an event. The memory events goroutine
45 // will ensure a minimum of one event is emitted per this period, regardless
46 // how of much memory usage has changed.
47 period time.Duration
48
49 // Writing to this channel indicates the memory goroutine should stop.
50 stop chan struct{}
51
52 // done is used to signal when the memory event goroutine has exited.
53 done sync.WaitGroup
54}
55
56// New creates a new MemoryEvents.
57func New(k *kernel.Kernel, period time.Duration) *MemoryEvents {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected