Disable Automatic Memory Dump Deletion on Low Disk Space
In this article
When your Windows PC runs low on disk space, the system may automatically delete memory dump files (like the ones created during a blue screen) to free up room. This can hinder troubleshooting crash causes. This guide shows you how to disable that automatic deletion so your dump files are preserved for analysis.
What You'll Need
- Administrator access to your Windows PC (to change system settings).
- Knowledge of your Windows version (Windows 10 or Windows 11).
- Optional: A backup of the registry before editing (recommended).
Step-by-Step
- Open System Properties. Press Win + R to open the Run dialog. Type
sysdm.cpland press Enter. This opens the System Properties window. - Go to the Advanced tab. In the System Properties window, click on the Advanced tab at the top.
- Access Startup and Recovery Settings. Under the "Startup and Recovery" section, click the Settings button.
- Adjust Write Debugging Information. In the "Startup and Recovery" window, look for the "System failure" section. Under "Write debugging information," select the type of memory dump you want to keep. Common options are "Automatic memory dump," "Kernel memory dump," or "Complete memory dump." Choose the one that suits your needs. This step is crucial because the automatic deletion feature only applies to certain dump types.
- Disable Automatic Deletion (Registry Method). Now, we need to disable the automatic cleanup. Press Win + R, type
regedit, and press Enter. If prompted by UAC, click Yes. - Navigate to the Memory Dump Key. In the Registry Editor, go to the following path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl
You can copy and paste this into the address bar at the top and press Enter. - Create or Modify the AlwaysKeepMemoryDump Value. In the right pane, look for a DWORD value named
AlwaysKeepMemoryDump. If it exists, double-click it. If it does not exist, right-click in the empty space, select New > DWORD (32-bit) Value, and name itAlwaysKeepMemoryDump. - Set the Value to 1. Double-click the
AlwaysKeepMemoryDumpvalue, set the "Value data" to 1, and ensure the "Base" is set to Hexadecimal. Click OK. - Close the Registry Editor. Close the Registry Editor window.
- Restart Your Computer. For the change to take effect, restart your PC. After restart, automatic deletion of memory dumps due to low disk space will be disabled.
Common Mistakes
- Not setting the dump type: The AlwaysKeepMemoryDump value only works if a memory dump is set to be created. If you have "(none)" selected in Step 4, no dump will be kept at all.
- Editing the wrong registry key: Ensure you are in the
CrashControlkey underCurrentControlSet, not underControlSet001orControlSet002(though those might work, it's safer to use the current one). - Forgetting to restart: The registry change may not take effect until you restart the system. Some services may pick it up immediately, but a restart is the most reliable.
- Not having admin rights: Without administrator privileges, you cannot modify the registry or system settings. Make sure you are logged in as an administrator or have the admin password.
Tips
- Regularly clean dump files manually: Even with automatic deletion disabled, you should occasionally delete old dump files to free up space. Use the Disk Cleanup tool (cleanmgr.exe) or manually delete files in
C:\Windows\MinidumpandC:\Windows\MEMORY.DMP. - Set a larger page file: Memory dumps require a page file large enough to hold the dump. Ensure your page file is at least the size of your RAM (for kernel dumps) or larger (for complete dumps).
- Use a dedicated crash analysis tool: Tools like WinDbg or BlueScreenView can help you analyze dump files, making it worth keeping them.
- Check disk space regularly: Even with dumps preserved, low disk space can cause other issues. Use Storage Sense or a third-party tool to monitor free space.
Troubleshooting
If the change doesn't seem to work:
- Verify the registry value: Re-open the Registry Editor and double-check that
AlwaysKeepMemoryDumpis set to 1. Sometimes a typo in the value name can cause it to be ignored. - Check the dump type: Make sure you have selected a dump type other than "(none)" in the Startup and Recovery settings. If you selected "Small memory dump (256 KB)", this setting might not apply the same way. Consider using "Automatic memory dump" or "Kernel memory dump" for better coverage.
- Ensure the page file is adequate: If the page file is too small, Windows may not be able to create a dump at all. Go to System Properties > Advanced > Performance Settings > Advanced > Virtual Memory, and set a custom size that is at least the size of your RAM (for kernel dumps).
- Check for Group Policy interference: On Windows Pro or Enterprise, a Group Policy might override this setting. Run
gpedit.mscand navigate to Computer Configuration > Administrative Templates > System > Crash Control. Ensure "Always keep memory dump" is set to "Enabled" or "Not Configured". - Look at Event Viewer: If dumps are still being deleted, check the Event Viewer under Windows Logs > System for any warnings from the "BugCheck" or "Disk" sources that might indicate why.
Frequently Asked Questions
Q: What exactly does the AlwaysKeepMemoryDump registry value do?
A: It tells Windows to never automatically delete memory dump files when disk space is low. This preserves them for later analysis, even if the drive is nearly full.
Q: Does this affect all types of memory dumps?
A: The setting primarily targets the automatic memory dump and kernel memory dump. Small memory dumps (minidumps) are typically not affected by the automatic deletion, but this setting ensures all dumps are kept.
Q: Will disabling automatic deletion cause my disk to fill up faster?
A: Yes, if you have frequent crashes, dump files can accumulate and consume significant disk space. You should monitor disk usage and manually delete old dumps when needed.
Q: Can I still delete memory dumps manually after enabling this?
A: Absolutely. You can manually delete dump files at any time using File Explorer or Disk Cleanup. This setting only prevents automatic deletion, not manual deletion.
Q: Is this setting available on Windows 10 and Windows 11?
A: Yes, the registry key and the Startup and Recovery settings are present in both Windows 10 and Windows 11. The steps are the same for both versions.
Q: What if I don't see the AlwaysKeepMemoryDump value?
A: That's normal. It doesn't exist by default. You need to create it as a new DWORD (32-bit) value. Follow the steps above to create it.