Kernel Mode Heap Corruption blue screen error

KERNEL_MODE_HEAP_CORRUPTION (0x13A) Fix: 12 Proven Ways to Stop This BSOD

You were mid-task, maybe mid-game, and the screen went blue. In white letters: KERNEL_MODE_HEAP_CORRUPTION. The PC reboots, and you’re left staring at a desktop wondering if you just lost work, or worse, if this is going to happen again in twenty minutes.

It usually will happen again until you fix the actual cause. This isn’t a cosmetic glitch Windows shrugs off. It’s the operating system catching real memory damage and shutting itself down before that damage spreads.

It is good to understand that in the vast majority of cases, the fix is something you can do yourself in under an hour, no repair shop required.

Quick answer: KERNEL_MODE_HEAP_CORRUPTION (bug check 0x0000013A) means Windows’ kernel-mode memory manager detected that a block of memory it’s responsible for has been overwritten or damaged. It’s almost always traced to one of three sources: a faulty or outdated driver (graphics, network, or storage drivers are the usual suspects), failing RAM, or corrupted system files. Updating or rolling back your graphics driver resolves it for most people on the first try.

This guide walks through what’s actually happening under the hood, how to find the specific driver or component responsible instead of guessing, and twelve fixes ordered from fastest to most drastic.

What Is Kernel Mode Heap Corruption?

Windows keeps a region of memory called the kernel-mode heap. It is a pool of memory blocks that the OS core and device drivers borrow and return as they work. Every block has a small header the memory manager uses to track its size and boundaries.

When a driver (or occasionally the kernel itself) writes past the edge of a block it was given, or writes to memory after it’s already been freed, that header gets damaged.

The next time the heap manager checks that block’s integrity, which it does constantly, it notices the header doesn’t add up. At that point, continuing to run would risk silently corrupting more memory, so Windows deliberately crashes instead. That crash is bug check 0x0000013A, displayed on the blue screen as KERNEL_MODE_HEAP_CORRUPTION.

It’s worth understanding why Windows does this on purpose. A stop code is a safety mechanism, not a failure of the safety mechanism. The corruption already happened before the crash; the BSOD is Windows catching it before your files or your registry get scrambled too.

You’ll usually see this error in one of three situations:

  • Right after installing or updating a driver, especially a GPU driver
  • While a specific application is running, often a game, since games push GPU and memory drivers harder than almost anything else
  • Randomly, with no obvious trigger, which more often points to RAM or a low-level storage/chipset driver

If you’ve also seen PFN_LIST_CORRUPT or DRIVER_CORRUPTED_EXPOOL, those are close cousins. They point to the same category of memory-management problem and respond to the same troubleshooting approach below.

Related reading: Fixing the Windows Unexpected Kernel Mode Trap Error

Reading the Actual Error (For When You Want the Real Cause, Not a Guess)

Every BSOD writes a small crash log called a minidump to C:\Windows\Minidump. If you want to stop guessing which driver is at fault and actually confirm it, this is the fastest route, and it’s easier than it sounds.

  1. Download WinDbg (free, from the Microsoft Store) or the lighter third-party tool BlueScreenView.
  2. Open the most recent .dmp file from C:\Windows\Minidump.
  3. In WinDbg, run !analyze -v and press Enter.
  4. Look at the FAILURE_MODULE_NAME or the top of the stack trace. If a specific .sys file is named (for example, a GPU driver like nvlddmkm.sys or a network driver), that’s your prime suspect; update, roll back, or remove it.
  5. If the analysis says “memory corruption” with no specific module, or if Unable to get NonPagedPoolStart appears, the corruption is more likely coming from bad RAM or storage rather than a single driver.

This one step can save you hours of trial-and-error, because instead of updating twenty drivers at random, you go straight to the one causing the problem.

What Causes KERNEL_MODE_HEAP_CORRUPTION?

CauseHow commonHow to confirm
Outdated/buggy driver (GPU, network, storage)Very commonMinidump analysis, Device Manager warnings
Faulty or unstable RAMCommonWindows Memory Diagnostic or MemTest86
Corrupted system filesCommonsfc /scannow reports repairs
Overclocking (CPU/GPU/RAM)Common on gaming/enthusiast PCsError stops after disabling OC
Malware tampering with kernel memoryOccasionalFull antivirus/anti-malware scan
Failing storage drive (SSD/NVMe firmware bugs)Occasionalchkdsk, drive manufacturer diagnostic tool
Insufficient virtual memory/page fileOccasionalError under heavy memory load specifically
Incompatible software or background app conflictOccasionalClean boot isolates it
Improperly seated hardware after an upgradeRare but easy to missReseat RAM/GPU, reboot

How to Fix the KERNEL_MODE_HEAP_CORRUPTION Error

Work through these in order. They’re arranged from quickest and least invasive to most drastic. Most people never need to go past fix #5.

Before you start: create a system restore point (search “Create a restore point” in the Start menu, click Create). If a fix goes sideways, you can undo it in a couple of clicks. It’s also worth backing up anything irreplaceable, since repeated BSODs can occasionally leave files mid-write and damaged.

1. Get Into Windows First (If You Can’t Boot Normally)

If the crash happens so early or so often that you can’t reach the desktop, boot into Safe Mode or the Windows Recovery Environment first:

  • Restart your PC, and as soon as it starts to boot, hold the power button for 5–10 seconds to force a shutdown. Repeat this two or three times.
  • On the third interrupted boot, Windows automatically launches into the Windows Recovery Environment (WinRE).
  • Go to Troubleshoot → Advanced options → Startup Settings → Restart, then press 4 or F4 to boot into Safe Mode.

Every fix below can be performed from Safe Mode if needed.

2. Update or Roll Back Your Drivers

This resolves the issue for most users, and graphics drivers are the single most common culprit.

Windows-10-driver-update

If the crashes started after a driver update, roll it back:

  1. Right-click Start → Device Manager.
  2. Expand Display adapters, right-click your GPU, and select Properties.
  3. Open the Driver tab and click Roll Back Driver. (If it’s greyed out, no previous version is saved. Skip to updating instead.)
  4. Restart and see if the error returns.

If the crashes started with no update, or rolling back didn’t help, do the opposite. Get a clean, current driver:

  1. Go to Device Manager, expand the relevant category (Display adapters, Network adapters, Storage controllers), right-click the device, and choose Uninstall device. Check “Attempt to remove the driver” if prompted, then restart. Windows will reinstall a generic driver automatically.
  2. For GPUs specifically, download the latest driver directly from NVIDIA, AMD, or Intel’s website rather than relying only on Windows Update, since manufacturer sites are often ahead of the Microsoft catalog.
  3. Install it, restart, and monitor for the error.

3. Run Driver Verifier to Catch the Exact Driver Responsible

If you’re still not sure which driver is to blame, Driver Verifier is Microsoft’s own tool for forcing a misbehaving driver to reveal itself. It stresses every installed driver and crashes immediately when one violates memory rules – turning a vague “corruption somewhere” into a specific file name.

  1. Open Command Prompt as administrator and type verifier, then press Enter.
  2. Choose Create standard settingsAutomatically select all drivers installed on this computerFinish.
  3. Restart and use your PC normally until it crashes (this can take anywhere from a few minutes to a day).
  4. The resulting BSOD will name the exact .sys file at fault; update, roll back, or uninstall that driver.
  5. Important: turn Driver Verifier back off once you’ve identified the driver, since it slows the system down noticeably. Run verifier /reset in an admin Command Prompt.

Expert tip: if your PC won’t boot at all once Driver Verifier is enabled, hold the power button to force a shutdown, then boot into Safe Mode and run verifier /reset from there.

4. Repair Corrupted System Files with SFC and DISM

Corrupted system files, usually from an interrupted update or a sudden power loss, can trigger this same bug check. Run DISM first, since SFC relies on a healthy Windows image to pull replacement files from.

Open Command Prompt as administrator and run:

DISM /Online /Cleanup-image /Restorehealth

Once that finishes, run:

sfc /scannow

Let both complete fully (DISM especially can take 10–20 minutes), then restart.

Related reading: How to Resolve the DISM Error 1910 in Windows 10?

5. Test Your RAM

Faulty RAM is one of the most frequent hardware causes of heap corruption, because the kernel heap lives in physical memory. If a module has a bad cell, the data written there gets scrambled regardless of which driver touched it.

  1. Press Windows key + R, type mdsched.exe, and press Enter.
  2. Choose Restart now and check for problems.
  3. Let it run. It can take a while, especially on higher-capacity kits.

If you want a more thorough result, MemTest86 (free, boots from USB) runs more passes and is generally considered more reliable at catching intermittent errors than Windows’ built-in tool.

If either finds errors, the fix is physical: reseat the RAM sticks, try them one at a time to isolate a bad module, or swap them into different slots. If problems persist, the module needs replacing. <!– Affiliate Opportunity –>

If your Windows Memory Diagnostic or MemTest86 comes back with errors, a reliable RAM kit like Corsair Vengeance (available on Amazon) is a straightforward, inexpensive swap that resolves heap corruption for good in these cases. Just make sure the speed and voltage match your motherboard’s supported specs.

6. Disable Overclocking

If you overclock your CPU, GPU, or RAM (including XMP/DOCP memory profiles), that’s a prime suspect. Pushing components past their rated speed is one of the most common self-inflicted causes of heap corruption, especially without adequate cooling.

  • In your BIOS/UEFI, reset CPU and RAM settings to their default/JEDEC values, or disable XMP/DOCP entirely.
  • Uninstall or disable any third-party overclocking software (MSI Afterburner, Ryzen Master, etc.) and confirm clocks have returned to stock.
  • Test for a few days at stock settings before reintroducing any overclock, and if you do, reintroduce it more conservatively.

7. Increase Your Virtual Memory (Page File)

If the crashes tend to happen during heavy multitasking or memory-intensive apps, an undersized page file can contribute to heap-related errors.

  1. Search “Advanced System Settings” in the Start menu and open it.
  2. Under the Advanced tab, click Settings under Performance, then the Advanced tab again.
  3. Under Virtual Memory, click Change, uncheck “Automatically manage paging file size for all drives,” select your system drive, choose Custom size, and set it to roughly 1.5x your installed RAM for both initial and maximum size.
  4. Restart.

8. Scan for Malware

Some malware families interact directly with kernel memory or install malicious drivers, which can present exactly like a legitimate driver bug.

Run a full scan with Windows Security (Settings → Privacy & Security → Windows Security → Virus & threat protection → Scan options → Full scan) or your preferred antivirus. A quick scan isn’t thorough enough here. Use the full option.

9. Check Your Disk for Errors

A failing or corrupted drive can damage data on the way to memory, mimicking heap corruption. Open Command Prompt as administrator and run:

chkdsk /f /r

You’ll be prompted to schedule the check on next restart. Accept, then reboot and let it run to completion (it can take a while on larger drives).

If you’re on an SSD or NVMe drive, it’s also worth downloading your manufacturer’s diagnostic tool (Samsung Magician, Crucial Storage Executive, WD Dashboard, etc.) to rule out a firmware issue.

Related reading: How to Fix an Unmountable Boot Volume Error in Windows 10 or 11?

10. Clean Boot to Rule Out a Software Conflict

If the error only appears with specific software running, a particular game or app, a background program conflict may be to blame.

  1. Press Windows key + R, type msconfig, and press Enter.
  2. On the Services tab, check Hide all Microsoft services, then click Disable all.
  3. Open Task Manager (Ctrl+Shift+Esc) → Startup tab, and disable each entry.
  4. Restart. If the crash doesn’t recur, re-enable programs a few at a time until it does. That narrows down the conflicting app so you can update, disable, or uninstall it specifically.

11. Reseat Hardware and Check for Overheating

If you recently installed or moved hardware, double-check that RAM sticks and expansion cards are firmly seated. A slightly loose connection can produce intermittent memory errors that look identical to a driver bug.

While you’re in there, check temperatures with a tool like HWMonitor; components running hot under load can also corrupt memory as a protective side effect of thermal throttling gone wrong.

12. Reset or Reinstall Windows (Last Resort)

If nothing above resolves it, the system files or drivers may be too deeply tangled to fix individually.

  • Reset this PC (Settings → System → Recovery) reinstalls Windows while optionally keeping your personal files, removing all installed programs and their drivers in the process.
  • A clean install from a USB installer wipes the drive entirely and is more thorough, but you’ll need to back up everything first.

Try Reset before a full clean install. It solves the same class of problem for most people with far less setup afterward.

Before attempting a Reset or clean install, back up your files to an external drive. Something like a SanDisk portable SSD is fast enough and easily available on Amazon that a full backup won’t eat your whole afternoon, and it gives you a safety net if the reset doesn’t go smoothly.

DISM vs. SFC: Which Do You Actually Need?

DISMSFC
FixesThe underlying Windows system imageIndividual protected system files
Best usedFirst, especially after repeated crashes or a failed updateAfter DISM, or on its own for lighter corruption
Needs internetYes (pulls clean files from Windows Update by default)No
Typical run time10–20 minutes5–15 minutes

Run them together, DISM first, for the most thorough repair. SFC’s replacement files come from the same image DISM just repaired.

Myth vs. Fact

Myth: “Kernel Mode Heap Corruption means my hard drive is dying.” Fact: Storage failure is one possible cause, but drivers and RAM are far more common. Don’t replace a drive based on this error alone; test first.

Myth: “Reinstalling Windows always fixes it permanently.” Fact: If the root cause is faulty RAM or an unstable overclock, a reinstall will only delay the next crash. Fix the hardware cause, or it comes back.

Myth: “This only happens on old, cluttered PCs.” Fact: It’s just as common, arguably more common, on brand-new gaming PCs right after a driver update or an aggressive factory overclock.

Related reading: How to Resolve the Windows System Service Exception Error?

Common Mistakes That Make This Harder to Fix

  • Updating every driver at once. It feels productive, but it erases your ability to tell which change actually fixed it, or caused it.
  • Skipping the minidump. Guessing at drivers can take hours; reading the crash log points you at the right one in minutes.
  • Ignoring RAM as a possibility because “the computer is new.” New RAM fails too, and DOA sticks are more common than people expect.
  • Leaving Driver Verifier turned on after diagnosis. It’s meant to be temporary. Running it long-term will noticeably slow your PC.
  • Not creating a restore point before troubleshooting, which turns a bad fix attempt into a bigger headache than the original crash.

Preventing It From Coming Back

  • Keep GPU and chipset drivers current, but install them from the manufacturer’s site rather than blindly auto-updating.
  • If you overclock, stress-test any new profile for at least a few hours before trusting it for daily use.
  • Run Windows Update regularly rather than deferring it for months at a time.
  • Keep at least 15–20% of your system drive free. Severely low disk space can contribute to file corruption during updates.
  • Schedule an occasional chkdsk and sfc /scannow as routine maintenance, the same way you’d check tire pressure.

Final Thoughts

KERNEL_MODE_HEAP_CORRUPTION looks alarming because of what a BSOD represents, but it’s one of the more diagnosable stop codes Windows has. The minidump almost always points somewhere specific if you take the two minutes to look.

Work through the fixes above in order, starting with drivers and RAM before you touch anything more drastic, and keep that restore point as your safety net the whole way through.

Frequently Asked Questions

What does KERNEL_MODE_HEAP_CORRUPTION mean?

It means Windows’ kernel-mode memory manager detected that a block of protected memory was overwritten or damaged, and shut the system down to prevent further corruption. The bug check code is 0x0000013A.

What is bug check 0x13A?

0x13A is the numeric stop code Windows assigns to KERNEL_MODE_HEAP_CORRUPTION. You’ll see it listed on the blue screen and in the minidump file generated after the crash.

What’s the single most common cause?

An outdated or buggy graphics driver, followed closely by faulty RAM and corrupted system files.

Can a bad graphics driver really cause this?

Yes. It’s the most common cause by a wide margin. GPU drivers interact heavily with kernel memory, and a bug in one can easily corrupt a heap block.

How do I find out which driver is causing it?

Open the latest .dmp file from C:\Windows\Minidump in WinDbg and run !analyze -v. The failure module listed is usually the responsible driver. Driver Verifier can confirm it if the minidump is inconclusive.

Is this error more common on Windows 10 or Windows 11?

It appears on both at similar rates, since the underlying cause is almost always a driver or hardware issue rather than something specific to either OS version.

Can faulty RAM cause Kernel Mode Heap Corruption?

Yes. The kernel heap lives in physical memory, so a bad RAM cell can corrupt heap blocks regardless of which driver is running at the time. Run Windows Memory Diagnostic or MemTest86 to check.

Does overclocking cause this error?

It can, especially with an unstable memory (XMP/DOCP) profile or an aggressive CPU/GPU overclock without adequate cooling. Reverting to stock settings is a common, reliable fix.

Will increasing my page file fix it?

Sometimes, particularly if crashes correlate with heavy multitasking or memory-intensive apps. It’s not a universal fix, but it’s quick to try and low-risk.

Is Kernel Mode Heap Corruption dangerous to my files?

The crash itself is Windows protecting your data by stopping before corruption spreads. Occasionally, an in-progress file write can be interrupted by the crash, so keeping backups is good practice regardless.

Can malware cause this BSOD?

It’s less common than driver or hardware causes, but yes. Malware that installs a malicious driver or tampers with kernel memory can trigger it. A full antivirus scan rules this out.

How do I use Driver Verifier safely?

Create a restore point first, enable it with standard settings, use your PC normally until it crashes or a driver is flagged, then immediately run verifier /reset once you’ve identified the problem driver.

What if I can’t boot into Windows at all?

Interrupt the boot process three times in a row (hold the power button during startup) to force Windows into Recovery Environment, then boot into Safe Mode from Troubleshoot → Advanced options → Startup Settings.

Should I run SFC or DISM first?

Run DISM first. It repairs the underlying Windows image that SFC pulls replacement files from. Running SFC alone on a damaged image can fail silently.

Can a failing SSD or hard drive cause this error?

Yes, though less commonly than drivers or RAM. Run chkdsk /f /r and your drive manufacturer’s diagnostic tool to check.

Does resetting Windows actually fix Kernel Mode Heap Corruption?

It fixes software-level causes (corrupted files, bad driver installs) but won’t fix hardware causes like failing RAM. If the crash returns after a clean install, suspect hardware.

How long does it take to diagnose the exact cause?

Reading a minidump takes about five minutes once WinDbg is installed. Driver Verifier can take anywhere from a few minutes to a day to force a repeat crash, depending on how often the faulty driver is triggered.

Is this the same as PFN_LIST_CORRUPT?

They’re related but distinct bug checks. Both point to kernel memory-management problems and respond to the same category of fixes (drivers, RAM, system files), but PFN_LIST_CORRUPT specifically involves the page frame number database.

Can I prevent this error entirely?

You can significantly reduce the odds by keeping drivers current (from manufacturer sites), avoiding unstable overclocks, keeping adequate free disk space, and running periodic SFC/DISM and memory checks. But no combination of precautions eliminates hardware failure risk.

When should I contact Microsoft or a repair technician?

If you’ve worked through driver updates, Driver Verifier, RAM testing, and a system file repair without success, and a Windows reset doesn’t resolve it either, that’s a strong sign of a hardware fault worth having professionally diagnosed.

This article should have helped you solve your Windows 10 Kernel Mode Heap Corruption problem. If you have any more questions or comments, please post them in the comments section below.

We’d be glad to help you. Thank you so much for taking the time to read this!

Do like and follow us on Facebook and Twitter for regular updates. In addition, we ask that you bookmark this page for future reference.

Sign up for our free newsletter as well to receive fresh information right in your inbox and stay informed technically.

Disclosure: If you follow our links to a retailer’s website and make a purchase, we will get an affiliate commission on some, but not all, of the items or services we promote. This will cause no price change for you.

You May Be Interested in Reading:

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *