Total physical & virtual memory utilized by a process tree.

Mark Wood-Patrick 1 Reputation point
2022-10-30T17:43:09.707+00:00

Is there a way in process explorer (or some other interactive tool) to get the total physical and virtual memory used by some process tree?

I have a windows 11 laptop with 16GB of memory and 11GB of it is being used by windows after it has booted and without any apps running (I have disabled all my startup apps including sysmain.

Being able to easily explore the process trees and get memory sizes at any level in the heirarchy would be very useful but I did not see any columns which provide this information. Am I missing something

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,390 questions
0 comments No comments
{count} votes

8 answers

Sort by: Most helpful
  1. Mark Wood-Patrick 1 Reputation point
    2022-11-25T13:52:40.653+00:00

    How do I install the latest version of poolmon on windows 11?

    0 comments No comments

  2. Wesley Li-MSFT 4,381 Reputation points Microsoft Vendor
    2022-11-29T02:59:46.803+00:00

    Hello,
    The version of PoolMon is included in the \Tools\Other subdirectory of the Windows Driver Kit (WDK).
    https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk

    0 comments No comments

  3. RaphaelFigueiredodeSouza-1060 0 Reputation points
    2024-04-18T16:06:15.0566667+00:00

    This Powershell function can sum the private bytes of all processes in a tree:

    function GetTreeMemoryUsage($root, $procs = $null, $level = 0) {
        if ($procs -eq $null) {
            $procs = Get-Process | % {
                @{
                    Id = $_.Id;
                    ParentId = $_.Parent.Id;
                    Name = $_.Name;
                    PrivateMemorySize64 = $_.PrivateMemorySize64
                }
            }
        }
    
        Write-Host -NoNewline "$("   " * $level)|-- $($root.Name)"
        Write-Host -ForegroundColor DarkGray " (PID $($root.Id); $($root.PrivateMemorySize64 / 1MB) MB)"
    
        $children = $procs | ? { $_.ParentId -eq $root.Id }
        
        $totalMemory = $root.PrivateMemorySize64
        $totalMemory += ($children | % { GetTreeMemory $_ $procs ($level + 1) } | measure -Sum).Sum
    
        return $totalMemory
    }
    

    You can use it like this:

    (GetTreeMemoryUsage (Get-Process "devenv")) / 1GB
    
    0 comments No comments