AllocationSizes returns allocation size of each stack frame in terms of allocation/module private non-shareable pages.
(pid uint32)
| 389 | // AllocationSizes returns allocation size of each stack frame |
| 390 | // in terms of allocation/module private non-shareable pages. |
| 391 | func (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. |
no test coverage detected