MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / TestQueryWorkingSetPoolSingletonInit

Function TestQueryWorkingSetPoolSingletonInit

pkg/util/va/ws_test.go:426–438  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

424}
425
426func TestQueryWorkingSetPoolSingletonInit(t *testing.T) {
427 // reset the singleton so poolOnce triggers again
428 poolOnce = sync.Once{}
429 p = nil
430
431 ws := []sys.MemoryWorkingSetExInformation{{VirtualAddress: 0x1000}}
432 // just ensure the lazy init path doesn't panic
433 _ = QueryWorkingSet(windows.CurrentProcess(), ws)
434
435 if p == nil {
436 t.Error("pool was not initialized by QueryWorkingSet")
437 }
438}
439
440func TestQueryWorkingSetConcurrentCalls(t *testing.T) {
441 const pageSize = 4096

Callers

nothing calls this directly

Calls 2

QueryWorkingSetFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected