Methods to Fix the Kernel Mode Heap Corruption BSoD Error

BSoD or Blue screen of death are dreaded error screens that are generated when there is a critical failure. The Kernel Mode Heap Corruption is one such error that causes the system to crash unexpectedly. It displays a stop code – KERNEL_MODE_HEAP_CORRUPTION and a bug check value of 0x0000013A.

This error occurs due to reasons, such as memory leaks, outdated or malfunctioning drivers, or hardware issues like faulty RAM module/s. Software conflicts are also said to generate this BSoD, which is rare, however. Let’s look at this error in detail.

What is the Kernel Mode Heap Corruption BSoD Error?

The KERNEL_MODE_HEAP_CORRUPTION BSoD error indicates corruption in the heap or a specific data structure. This error screen is displayed when the computer detects an issue with the system memory or encounters missing or damaged system files. Other reasons could also cause your computer to show this error. These are –

  • Insufficient page file size/ virtual memory
  • Outdated or malfunctioning drivers
  • Corrupt or missing system files
  • Faulty hardware (mostly RAM)
  • Conflicting software

Methods to Resolve the Kernel Mode Heap Corruption BSoD Error

It’s not easy to find the root cause behind a BSoD. The same is true with the fixes, as there is no ‘one fit for all’ solution. Hence, we will use various methods to try and eliminate the Kernel mode heap corruption error screen.

Methods –

Method 1: Check for Malware

Method 2: Update Device Drivers

Method 3: Fix Corrupt System Files and System Image using SFC & DISM Commands

Method 4: Check RAM Modules for any issues

Method 5: Increase Virtual Memory Limits/Page File Size

Pre-check –

Before we move on to the methods, let’s try and identify the root cause behind the KERNEL_MODE_HEAP_CORRUPTION BSoD screen. We will use the Event Viewer, a built-in Windows utility to check logs and details related to various significant events like this BSoD error. Here’s how you can use it –

  • Press WINDOWS + X and click on Event Viewer from the list.
  • Expand the Windows Logs entry and click on System under it.
  • Locate the ‘Kernel mode heap corruption’ log on the left side.

open even viewer to look for the kernel mode heap corruption error log

  • Double-click on it to open it and read more about it.
  • Note down the Event ID and Source for better understanding.

Once you have the information related to the BSoD, you will be better equipped to identify the cause/s behind this BSoD and deal with it. Now, move on to the methods to get rid of the KERNEL_MODE_HEAP_CORRUPTION blue screen error.

Method 1: Check for Malware

Malware infections are one of the root causes behind the KERNEL_MODE_HEAP_CORRUPTION error. If you have encountered this BSoD, the first thing you should do is run a full system scan. Use a reliable antivirus or Windows Defender to eliminate any system infections.

Method 2: Update Device Drivers

Outdated or corrupted device drivers can cause system-wide instability, causing devices or components to malfunction. This can lead to various errors like the KERNEL_MODE_HEAP_CORRUPTION blue screen error message. To resolve this, you can go to the Device Manager and update the outdated device drivers. Here are the steps for this –

  • Press WINDOWS + X and click on Device Manager.

open device manager

  • Locate the device that you want to update and expand it.
  • Right-click on the device with a yellow exclamation mark and click on Update driver.

click on update driver

  • Select the Search automatically for updated driver software option and wait for the process to finish.

install new drivers to fix the kernel mode heap corruption bsod error

  • Once the latest driver is installed, restart your computer.

NoteSome users were able to fix the KERNEL_MODE_HEAP_CORRUPTION blue screen error by updating the GPU driver. For that, you can go to your GPU manufacturer’s website to download the latest driver.

Method 3: Fix Corrupt System Files and System Image Using SFC & DISM Commands

If your computer is generating the KERNEL_MODE_HEAP_CORRUPTION BSoD, there are high chances of corrupt, missing, or damaged system files. It could also be a case of bad system image. You can execute SFC and DISM commands in the command prompt to rule out these possibilities.

To perform DISM scan –

  • Open the Command Prompt with administrator privileges.
  • Execute the following command – DISM /Online /Cleanup-image /Scanhealth.

run dism command using command prompt to scan health of system files

  • Then, execute this command – DISM /Online /Cleanup-image /Restorehealth.

run dism command to restore health of damage windows image

  • Let the process complete.

The DISM is a built-in disk image repairing tool which repairs any damage to the Windows OS image. Once this is done, perform the SFC command in the same CMD window.

To perform the SFC scan –

  • Type the following command – SFC /scannow.
  • Press Enter to execute it.

Wait for the scan to complete. It will repair or replace any damaged or corrupt system files.

Method 4: Check RAM Modules for Any Issues

An improperly seated or faulty RAM module can sometimes cause the KERNEL_MODE_HEAP_CORRUPTION BSoD error on your computer. To check the RAM modules in your PC, you can use either of the two methods explained below –

  • Using the built-in troubleshooter in Windows 10/11
  • Using MemTest86, a memory testing freeware.

Let’s see how you can use these methods to fix blue screen errors like the Kernel mode heap corruption on your windows PC.

To use the Windows Memory Diagnostic tool –

  • Press WINDOWS + Q
  • Search for the Windows Memory Diagnostic
  • Click on Run as administrator.

open windows memory diagnostic tool to check for any issue related to ram

  • Click the Restart now and check for problems (recommended)

start ram test to fix the kernel mode heap corruption blue screen error

Let the wizard perform the action. If the test shows any errors upon completion, run the auto-troubleshooter and resolve them. Once done, restart the system to check if this has resolved the BSoD error screen.

Using MemTest86 –

  • Open your web browser and download MemTest86.
  • Follow the instructions to create a media creation tool.
  • Run Memtest86 by following the instruction as per the manual.

Method 5: Increase Virtual Memory Limits/Page File Size

Players playing a popular title, ‘Escape From Tarkov,’ reported encountering the KERNEL_MODE_HEAP_CORRUPTION BSoD error. Even with a top-notch system configuration, their computers became sluggish and crashed, followed by this BSoD error.

As per the players, while playing on high graphics settings or during offline raid mode, the game uses more than 16 GB of RAM. This causes the RAM to reach almost 100% usage, leading to system crashes and unexpected BSoD screens. A Reddit user reported getting rid of this issue by increasing the virtual memory limits to accommodate graphic and asset rendering by the game.

Increasing virtual memory is a great way to address your computer's memory issues.

To increase virtual memory or paging file size, you can choose from the following two methods – using Settings and Command prompt. We will look at both of the ways one by one.

To increase virtual memory using Settings –

  • Press WINDOWS + I to open the Settings
  • Click on System.

open windows settings app

  • Scroll down to find About in the left pane. Click on it.
  • On the right pane, locate the Related settings and click on Advanced system settings under it.

Go into advanced settings

  • In the System Properties window, click on the Advanced
  • Navigate to the Performance section and click on Settings.

change performance settings to fix the kernel mode heap corruption error

  • In the new window, click on the Advanced
  • In the Virtual memory section, click on Change.

change virtual memory values

  • Uncheck the Automatically manage paging file size for all drives
  • Select the Custom size
  • Specify the Initial and the Maximum size. Generally, a number that is 1.5 times the total available memory should be used as the Initial size value, and a number 3 times the available memory should be used for the Maximum size (if possible).
  • Once you’ve entered the values, click on Set.
  • Click on OK.

change the paging file size to fix the kernel mode heap mode corruption error

  • Click on OK
  • Restart your computer.

Using Command Prompt to modify the paging file size –

  • Press WINDOWS + R and type CMD.
  • Press CTRL + SHIFT + ENTER to open it as an administrator.

open command prompt with administrator rights

  • Execute the following command - wmic pagefile list /format:list

run the command in cmd

  • Now execute the following command - wmic computersystem where name="%computername%" set AutomaticManagedPagefile=false

run the command to change paging file size using cmd

  • Now execute the following command to set the initial and the maximum size of the virtual memory - wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=YOUR-INIT-SIZE,MaximumSize=YOUR-MAX-SIZE

run the command to update virtual memory limits to resolve the kernel mode heap corruption bsod error

NoteHere, replace the YOUR-INIT-SIZE with a number 1.5 times the total available memory as the Initial size value. Similarly, replace YOUR-MAX-SIZE with a number 3 times the available memory for the maximum size. For e.g., - wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=9216,MaximumSize=12288

  • Once the command is executed, restart your computer for the changes to take effect.

After rebooting, your PC will use the new paging file limits.

Changing the virtual memory size should improve the gaming experience and resolve the Kernel mode heap corruption BSoD error.

Recover Lost Data Due to BSoD Error

Blue screen errors like the KERNEL_MODE_HEAP_CORRUPTION are annoying and hamper our work in numerous ways. While most of the time, they are easily resolved, sometimes they cause frequent crashes, causing subsequent damage to the system or its components. This leads to data loss, file corruption, bad sectors in the drive, and other issues.

In a typical situation where the system has been rendered unbootable or is frequently crashing, recovering data in one piece becomes essential. This is where you need a professional data recovery software like Stellar Data Recovery Professional.

This handy software recovers inaccessible or lost data present in the storage drive of an unbootable or crashed computer. Thanks to its powerful algorithms, you get to do a bit-by-bit search and bring out everything that can be recovered.

Its intuitive UI empowers all kinds of users to use it without much hassle and retrieve their data in a matter of a few clicks. Follow this detailed guide to learn how to use Stellar Data Recovery Professional to recover data from your unbootable/crashed PC.

Some Handy Tips

As the KERNEL_MODE_HEAP_CORRUPTION blue screen error is a memory-related issue, the methods mentioned earlier in this post should help you resolve it. However, there are some handy tips you can use to troubleshoot this BSoD error –

  • To avoid overheating of your computer and its components, keep it in a well-ventilated area.
  • Switch RAM slots
  • Switch from dual channel to single channel RAM configuration.
  • Try disabling startup items.

BSoD Terminated

The KERNEL_MODE_HEAP_CORRUPTION BSoD error in Windows PCs is an irritating issue that usually happens due to insufficient page memory or RAM. Many users have faced this pesky issue, and if you are one of those, the methods mentioned here should help you fix this BSoD error easily.

P.S. – The KERNEL_MODE_HEAP_CORRUPTION blue screen error could also occur due to overclocked components. Try disabling overclocking to get rid of this error.

Was this article helpful?
Heap corruption occurs when the allocator’s view of a heap gets damaged. This causes memory leaks and renders the memory inaccessible to the program.
Common sources that lead to heap corruption errors include a task that corrupts a block header or an incorrect argument passed onto a memory allocation function.
To fix the kernel mode heap corruption BSoD error – • Update/roll back your graphics card drivers • Update device drivers • Repair corrupted system files • Increase virtual memory limits • Resolve software conflicts
About The Author
no author img
Keshav Katyal

A passionate writer, driven by his interest in everything tech, Keshav Katyal has always been captivated by the latest gadgets since childhood. His interest in gadgets grew when he got his first gaming console, the Nintendo Game Boy Advanced. Hours and days of tinkering with gadgets encouraged the inner geek in him who now loves writing about the latest technologies.

Table of Contents


Why Choose Stellar?
  • 0M+


  • 0+

    Years of Excellence

  • 0+

    R&D Engineers

  • 0+


  • 0+


  • 0+

    Awards Received