Quick fix: Use (Get-Process -Name SomeApp).WorkingSet = 0 in PowerShell — this asks Windows to trim the working set of the named process, pushing unused pages to standby. The .NET wrapper calls the same EmptyWorkingSet API used by RAMMap. Memory pressure on Windows 11 24H2’s revised memory manager benefits more from working set trimming than older builds.
Windows 11 24H2 ships a revised memory compression and prioritization stack. On systems with 16 GB of RAM running heavy workloads (multiple browsers, VMs, IDEs), the working set of background processes accumulates faster than Windows trims it. The result is that committed memory looks high even though much of it is technically reclaimable. Manually trimming working sets reclaims standby memory immediately.
Affects: Windows 11 24H2 on systems with 8–16 GB RAM running heavy workloads.
Fix time: 5 minutes.
What “working set” means
A process’s working set is the physical RAM currently allocated to it — the pages Windows is keeping resident because the process has used them recently. When a process is idle, many of those pages are no longer being accessed but Windows hasn’t reclaimed them. Calling EmptyWorkingSet tells Windows to push the working set down toward the minimum; pages that are still needed get faulted back in on next access (with a small one-time latency cost).
This isn’t magic and doesn’t reduce committed memory — if the process needs the pages again, they come back. But for processes that genuinely don’t need most of their cached pages (a minimized browser, a backgrounded IDE), trimming reclaims memory that other apps can use immediately.
Method 1: Trim a single process
- Open PowerShell (no admin needed for your own processes).
- Identify the process:
Get-Process -Name chrome | Select-Object Id, WorkingSet64 - Trim its working set:
(Get-Process -Name chrome).WorkingSet = 0 - Verify the trim worked:
Get-Process -Name chrome | Select-Object Id, WorkingSet64
The WorkingSet64 value should be much lower than before.
The first access to a trimmed page brings it back to working set, so the process behaves normally — it just has fewer cached pages resident.
Method 2: Trim all idle background processes via a script
For a system-wide periodic trim:
- Open Notepad and paste:
$candidates = Get-Process | Where-Object { $_.WorkingSet64 -gt 100MB -and $_.Id -ne $PID }
foreach ($p in $candidates) {
try { $p.WorkingSet = 0 } catch { }
} - Save as
C:\Scripts\trim-memory.ps1. - Open Task Scheduler. Create a task triggered every 2 hours that runs this script.
- Set Run with highest privileges so it can trim system processes.
- Save.
The script trims any process using over 100 MB. After running, Task Manager’s “In use” value drops; standby grows; total committed memory is unchanged. New apps can allocate from the freed working set without waiting for Windows to passively reclaim.
Method 3: Use RAMMap for visual control
For one-shot trims with a GUI:
- Download RAMMap from
learn.microsoft.com/sysinternals/downloads/rammap(Sysinternals, free). - Run as Administrator.
- Click Empty → Empty Working Sets from the menu.
- All processes have their working sets trimmed at once.
- Also useful: Empty Standby List (different operation; reclaims standby pages back to free).
RAMMap shows a clear visualization of memory state before and after. Useful for diagnosing memory pressure issues.
How to verify the fix worked
- Run
Get-Process | Sort-Object WorkingSet64 -Descending | Select-Object -First 10 | Format-Table Name, Id, WorkingSet64— the top processes’ working sets have dropped. - Open Task Manager → Performance tab → Memory. In use value is lower after trim.
- Standby memory increases by roughly the amount you trimmed.
- Switch to a previously-trimmed app — it’s responsive after a brief moment as pages are faulted back.
If none of these work
If trimming has no effect, you may already have very tight working sets — Windows 11 24H2’s memory manager is more aggressive than older builds, so manual trims have less to clean up. For systems where you’re actually memory-pressured (committed memory exceeds physical RAM and the page file is growing), trimming working sets doesn’t help — you need to close apps or add RAM. For long-running PowerShell sessions where the trim script itself accumulates working set, periodically restart the script via the scheduled task instead of running indefinitely.
Bottom line: EmptyWorkingSet via PowerShell, RAMMap, or a scheduled script reclaims standby memory that Windows otherwise hangs onto. Useful on 8–16 GB systems under load; not magic. For real memory pressure, the answer is more RAM, not more trimming.