windbg-user-virtual-memory-exhaustion
Skill469 starsChanged 36 days agoMITView on GitHub
Use when a native app, service, or user-mode driver host allocation fails; distinguish VA exhaustion, fragmentation, and commit pressure. Not for managed .NET heap growth, proving a leak from one snapshot, or corruption.
In this repository11 other files it gives its agents.
- windbg-diagnostic-methodSkill
- windbg-kernel-bugcheck-triageSkill
- windbg-kernel-irp-lifecycle-triageSkill
- windbg-kernel-lock-deadlock-triageSkill
- windbg-kernel-verifier-triageSkill
- windbg-user-exception-triageSkill
- windbg-user-heap-corruption-investigationSkill
- windbg-user-mutex-held-across-co-awaitSkill
- windbg-user-ttd-reverse-debugging-triageSkill
- windbg-user-wait-chain-analysisSkill
- sample-skillSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Load
windbg-diagnostic-methodfirst: if it is not already loaded in this conversation, and apply it throughout for evidence ranking, … - Very specific: line 49
Use contemporaneous system memory counters or an appropriate live/kernel session for system commit data.
- Very specific: line 67
Use !address -? and !heap -?
- Distinctive: line 88
Use RAII to release resources on all supported exit/error paths.
- Distinctive: line 90
Do not blindly increase limits or stack reservations before finding the pressure source, and do not convert a failed allocation into a …
- Distinctive: line 97
Verify memory remains bounded or the intended allocation succeeds under the required constraints.
- Very specific: line 110
Follow FEEDBACK.md and submit reviewed, sanitized feedback to WinDbg-Feedback.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Virtual Memory Exhaustion
Load windbg-diagnostic-method first if it is not already loaded in this
conversation, and apply it throughout for evidence ranking, hypothesis testing,
confidence calibration, independent review, and report validation. This skill
adds the bug-family-specific commands and evidence requirements.
Detection
Investigate E_OUTOFMEMORY (0x8007000E), STATUS_NO_MEMORY (0xC0000017),
bad_alloc, or failed heap/virtual allocations in an application, service, or
user-mode driver host (including UMDF). Record the actual API, requested
size/alignment, architecture, flags, and error. Free physical RAM does not rule
out insufficient virtual address space, commit pressure, or applicable limits.
Workflow
1. Examine the process VA map
!address -summary
!address
!heap -sCompare available regions with the attempted allocation's contiguous range and alignment requirements. Distinguish reserved, committed, free, image, mapped, stack, and heap ranges. A large reservation consumes VA without committing its entire range. Heap internals may require more than the user's requested bytes.
Report unavailable pages/map data rather than inferring completeness from a limited dump.
2. Separate pressure mechanisms
| Mechanism | Evidence needed |
| VA exhaustion | Process address range/architecture and little usable free VA |
| Fragmentation | Free space exists, but no suitable contiguous/aligned region |
| System commit pressure | Commit usage/limit near the failure, not just free RAM |
| Process/job memory limit | Actual configured limit and relevant usage/accounting |
| Allocation policy/API failure | API-specific constraints, flags, or allocator policy |
Use contemporaneous system memory counters or an appropriate live/kernel
session for system commit data. A process PEB is not a documented
MaximumCommit source. A process's committed bytes alone do not establish a
system-wide or job limit.
For 32-bit targets inspect /LARGEADDRESSAWARE and the host architecture;
2 GB versus up to 4 GB depends on those settings. Verify current documented
limits for the target Windows version and architecture instead of applying
one 64-bit limit to every system.
3. Identify dominant consumers
!address -f:Heap
!address -f:Stack
!heap -stat -h <heap-address>Use !address -? and !heap -? for allocator/version-specific support.
Classify dominant heaps, stacks, mappings, images, and reserved arenas.
Large or numerous allocations are not automatically leaks: map them to cache
policy, owners, workload, and expected lifetimes.
4. Establish growth with history
Collect authorized time-series counters, repeated comparable snapshots, or allocation/free tracing across the workload. Compare warm-up with steady-state behavior and verify whether memory is reclaimed when work finishes.
One snapshot plus process uptime cannot prove a leak rate. For a suitable
user-mode recording use windbg-user-ttd-reverse-debugging-triage; for damaged allocations
use windbg-user-heap-corruption-investigation instead.
Fix patterns
- Bound caches by an appropriate size/cost policy and verify eviction. Define the lifetime of any references returned before eviction.
- Match
VirtualAllocreservations with the correctVirtualFreerelease contract; distinguish decommit from release. - Use RAII to release resources on all supported exit/error paths.
- Reduce large contiguous allocation requirements where the design permits.
- Do not blindly increase limits or stack reservations before finding the pressure source, and do not convert a failed allocation into a silent success.
Validation
Name the failing allocation and pressure mechanism, identify the consumer with evidence, and exercise the remedy through warm-up, sustained load, and cleanup. Verify memory remains bounded or the intended allocation succeeds under the required constraints. Document configured system/job limits separately.
References
Feedback
Follow FEEDBACK.md and submit reviewed, sanitized feedback to
WinDbg-Feedback.
Include windbg-user-virtual-memory-exhaustion and the package version from plugin.json;
no automatic dump or memory-content upload.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

