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

Method AllocationSizes

pkg/callstack/callstack.go:391–402  ·  view source on GitHub ↗

AllocationSizes returns allocation size of each stack frame in terms of allocation/module private non-shareable pages.

(pid uint32)

Source from the content-addressed store, hash-verified

389// AllocationSizes returns allocation size of each stack frame
390// in terms of allocation/module private non-shareable pages.
391func (s Callstack) AllocationSizes(pid uint32) []uint64 {
392 proc, err := windows.OpenProcess(windows.PROCESS_QUERY_INFORMATION, false, pid)
393 if err != nil {
394 return nil
395 }
396 defer windows.Close(proc)
397 sizes := make([]uint64, len(s))
398 for i, f := range s {
399 sizes[i] = f.AllocationSize(proc)
400 }
401 return sizes
402}
403
404// Protections returns page protection mask for every
405// frame comprising the stack.

Callers 1

GetMethod · 0.80

Calls 2

AllocationSizeMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected