30-04-2021



[German]Some users of Windows 10 (and also Windows 8.1) are facing a strange error. After installing an update, Windows won’t boot anymore and reports error 0xc0000017. I took the time to write a blog post, explaining a bit the background of this issue.

If you are using all the available RAM, you will notice that the performance of your computer has noticeably decreased. This is due to the fact that the storage is full and there are no resources to complete its tasks. As soon as you clear the RAM, the computer will be able to perform tasks again and performance will return to its previous level. Method 8: Clear System Cache Windows 10 Using MiniTool Partition Wizard. After learning about some types of cache in Windows 10 and how to clean up your computer by clearing these cached data, you might want to clear cache for your PC immediately. But wait for a moment. Restart the Windows 10 System. The best way to clear the Windows memory cache is just to turn off the system and turn it on again. When trying to restart the system, Windows will either complete all the pending tasks or abandons them as needed. Unlike the regular hard drive, the system memory is volatile. I.e, without active power, the data in RAM is lost. Since all the memory is lost, Windows will start afresh. To clear the RAM in Windows 7, 8, and 10 via the task manager The task manager has long been an established feature in Windows systems. The background service lists running applications, services, and processes and also provides an overview of CPU and memory usage.

Advertising

The error 0xc0000017

This error occurs if Windows 10 (or Windows 8.1) is rebooting after installing an update. A blue screen appears with the following message:

There isn’t enough memory available to create a ramdis device.
Error code: 0xc0000017

I was trapped a while ago with this error within a virtual machine, when I installed an Insider Preview and ended with the screen shown below.

My attempt to find out more about the error text with the help of an error-lockup tool didn’t really go any further. Error code 0xc0000017 stands for STATUS_NO_MEMORY – There are not enough virtual memory or swap file quotas for the specified operation.

An attempt to explain the background

Instead of typing a few commands, I would like to take the time and dig into some of the background of this error. This may help some users to understand what has happened.

Windows PE, Update installs and ramdisks

Update installations require a restart to replace files that are blocked during a running Windows. For this purpose, a so-called Windows PE (PE stands for Preinstall Environment) boots. Then the required file operations are carried out within Windows PE. Once this transaction is completed, the machine reboots and the actual Windows is restarted.

Advertising

However, Windows PE is loaded into a ramdisk and depends on the fact that a certain number of (RAM) memory pages can be used in a contiguous way. The error 0xc0000017 probably occurs when trying to create a RAM disk for the Windows PE environment during the boot process. The problem here is that there should be enough RAM available. But something seems to fail. I found a ‘ shredded’ explanation here (German). There are no longer enough contiguous memory blocks to set up the RAM disk of the appropriate size. But why is that, anyway? For your understanding, I’ll dig a bit deeper.

Predictive Failure Analysis (PFA) in Windows

In Windows, there is a mechanism that analyzes ECC errors in memory and protects the operating system from using erroneous memory blocks in RAM. Microsoft has implemented a Predictive Failure Analysis (PFA) support in the Windows Hardware Error Architecture (WHEA) to detect ECC (Error Correction Code) memory errors.

WHEA monitors the ECC values of memory pages on which ECC errors have already been detected. If the number of ECC memory errors exceeds a threshold value during a configurable time interval, WHEA attempts to take the relevant memory page offline. For this purpose, the relevant memory page will be stored within the BCD database (BCD-Store, Boot Configuration Data Store) as bad. Microsoft has published a document Predictive Failure Analysis (PFA) discussing some details.

Memory Flush Command

Clear Ram Windows 10 Cmd

At this point it isn’t clear, whether the ECC value is for RAM or virtual disc pages. I assumed ECC values for RAM.

Clear Ram Windows 10 Cmd

The BCD issue with bad memory

Most systems doesn’t come with ECC RAM, so I don’t know exactly, why we have bad memory blocks in BCD store. My guess is, that faulty write operations are causing erroneous bad memory entries within BCD store. Nevertheless, the following statement from Microsoft brings light into the error 0xc0000017 issue:

Clear Ram Windows 10 Cmd

Windows does not provide an automated mechanism for clearing this list from the BCD system store. When the failing system memory is replaced, a system administrator must clear this list manually by using the BCDEdit command-line tool. If the list is not cleared, Windows will continue to exclude the memory pages in the list from being used by the system, even if the failing memory modules have been replaced.

This is cited from the following Microsoft document. So, if the bad memory is set in BCD store, it can cause a boot failure in ramdisk. So we need a solution to clean all bad memory entries in BCD store.

Clear

Check and clean bad memory entries in BCD store

Microsoft has published this document, explaining how to manage the badmemory entry in BCD store. Open an administrative command prompt window (using Run as administrator) and use the following bcdedit command:

bcdedit /enum {badmemory}

to enlist all etnries. On my system I havn’t bad memory entries at all (it’s a 10 year old system).

Many web posts recommends to use the command bcdedit /enum all to enlist the entries. But this results of a long list of miscellaneous entries, and you need to search for the relevant section delivering the bad memory list.

If bcdedit shows bad memory blocks in BCD store preventing the creation of a ramdisk, we need to clean these entries. This may be done using the following command.

bcdedit /deletevalue {badmemory} badmemorylist

Note, that badmemorylist isn’t a placeholder, enter the command as listed above. But note, the command will result in an error message, if no badmemory entries are found.

I was able to manage it and add a couple of ‘faulty’ memory entries into BCD store, using the following command:

bcdedit /set {badmemory} badmemorylist 0xB7 0xB8

Then I tried the following command sequence and was at least successful with all commands.

Clear Ram Windows 10 Cmd Download

Note: The command bcdedit /set {badmemory} badmemorylist enables to block memory pages (see and here). The blocks have a size of 4 K, so you could try to ‘repair’ a system with a defective memory by blocking the memory pages. This can help if you cannot install Windows. Depending on the machine’s BIOS, it may also be necessary to disable the ‘Memory Hole Remapping’ option (see). But this isn’t the topic of my article.

After resetting the bad memory entries in BCD store, the machine should be able to enter Windows PE in ramdisk, install the update and reboot the updated operating system.

Note: How can it be possible, that BCD store contains bad memory entries, even, if a machine doesn’t have ECC RAM? Weighting my experience I made with an Insider Preview, I guess, it’s faulty updates, that writes wrong values into BCD store. I’ve mentioned above a virtual machine that failed with this error. The VM has a Windows 10 Insider Preview installed and I attempt to update to a new Insider Preview build. But the install ends with the blue screen shown above. Because my host machine, it’s the machine I used for my tests with bcdedit, didn’t show bad memory entries in BCD store, it’s not possible, that the guest has ECC errors in its memory. The only explanation I found, was: It’s faulty software, that has caused the entries.

How to fix a broken Windows?

The first case is, that startup repair is able to repair the broken system and Windows starts again. These cases has been reported many times. The user ends with endless update install attempts, ending with error 0xc0000017. In this case, open an administrative command prompt window and enter the following command:

bcdedit /deletevalue {badmemory} badmemorylist

This should clean the faulty entries in BCD store and the machine might boot again. And the update install should be possible finished successfully. If Windows doesn’t boot anymore, and hung with the following blue screen, you need a recovery tool to repair the system.

You can try the key F8 to invoke the Startup setting. Then you can try to enter command prompt window in Windows PE. But I guess, you will fail in most cases, because Windows PE can’t be loaded into ramdisk. Then you need to try an offline repair of your BCD store.

  1. Boot the Windows system with a USB stick or DVD containing an emergency Windows or installation image to access Windows PE using the computer repair options.

2. Then execute the bcdedit repair commands in offline mode at the command prompt.

The bcdedit syntax to access an offline BCD store are (see):

bcdedit /enum all /store <full path and file name of store>

But where is the BCD store located? Windows expects the hidden system file on the active partition in the Boot folder. If you know the logical drive name of this partition within your Windows PE, you can use the command as follows:

bcdedit.exe /deletevalue {badmemory} badmemorylist c:bootbcd

Here would be the logical drive c: the boot medium. Note that Windows PE usually runs on the logical drive X:. The logical drive c: does not necessarily have to be the partition with the broken Windows BCD store. You can type the command notepad.exe in the command prompt.

In the Windows Editor window, select File / Open and change the File type field in the dialog box to All Files. Then you can use the Open window as a mini-file manager, which allows you to inspect the drives.

The approach outlined here in the blog post can be used from Windows 7 up to Windows 10, and also under Windows Server. Maybe it helps, if you are affected by this error.

Similar articles:
Windows 10 Wiki
Check and repair Windows system files and component store
Windows 10 V1703: SuperFetch service fails
Windows: UAC opens hidden in background
Windows 10 Version 1607: System restore error 0x80070091 [Fix]
Windows 10: Defender Offline Scan boot loop – Part 2
How to fix Windows-Setup Hard Disk locked error

Cookies helps to fund this blog: Cookie settings
Advertising

Anyone who regularly works with a computer and has to deal with software which requires a lot of processing power knows how important powerful hardware is. Most people immediately think of the processor or graphics card (especially when the focus is on image and video editing). However, the main memory is also of fundamental importance for the smooth operation of the system and other software. This memory is required by the processor to manage the data of running programs and services or processes. The capacity of the main memory has a decisive influence on how many applications can be loaded simultaneously and how quickly data can be processed.

In principle, the more memory, the better. However, since the costs also play a role and the RAM memory cannot be expanded, many people use a fairly simple trick when the memory reaches its limits - deleting processes that are no longer required from the cache, and creating space for the data that is relevant for your current activities. This increasing your RAM. So all you do is clear the RAM or free it up.

  1. Free up your RAM – here’s how

What is the function of the main memory?

The main memory, also called RAM memory, is the central storage unit for all data that is required for programs or program parts that are currently running and for all active system processes. This memory, whose data is automatically lost when the computer is switched off, is accessed directly by the processor. If there is not enough memory available to process the relevant data during such an access attempt, the execution of the respective application will not work. The more processes take place simultaneously and the higher the system requirements of the executed programs, the more important a high capacity RAM becomes.

Which factors are vital for an efficient RAM?

The performance of the main memory is affected by the following three factors:

  • Access speed: time required for successful access (write or read operation)
  • Data transfer rate: a value that indicates the amount of data that can be transferred in a given time
  • Memory capacity: available RAM
Clear

These three things are essential for the efficiency of the main memory in managing processes to be executed. Capacity is of particular importance, as it sets a strict limit to the storage capacity. For example, if an application requires 2 gigabytes and another 3 gigabytes of memory over a longer time, both cannot run simultaneously if only 4 gigabytes of memory are available. However, when it comes to processing a large number of temporary processes, access speed and data transfer rate come into play. The faster the individual data is processed and then disappears from the main memory, the faster space is freed up from the RAM for new processes.

Why is it a good idea to clear your RAM? And when should you do this?

A slow PC can be frustrating, especially when you need to problem solve and use your computer quickly. An ever decreasing performance of the computer is often connected with straining the RAM. On the one hand, it is already automatically occupied by the operating system and system processes, on the other hand, it gets a bit fuller with every open program. Often it is of little use to close programs again. The latter is due to the fact that all files are rarely deleted from memory when you close an application. In addition, there are programs and processes that are active but not actually needed. For the above reasons, it may be advisable to clear the RAM if your computer shows signs of a significant decrease in performance

Free up your RAM – here’s how

Even if you are unsure whether your computer's memory is actually too full, you can try and free it up anyway. This way you’re only pre-empting an operation that would be performed automatically when you turn off your computer (but save the files you are working on so that your work results are not lost). In general, you have three different options for clearing your RAM manually:

  1. Empty the working memory via the task manager of your system
  2. Write a script that releases used memory
  3. Use an external tool that has a function for emptying RAM memory

The following sections explain what you need to do in detail.

To clear the RAM in Windows 7, 8, and 10 via the task manager

The task manager has long been an established feature in Windows systems. The background service lists running applications, services, and processes and also provides an overview of CPU and memory usage. Opening the Windows service works across all Windows versions by pressing the key combination[Ctrl] +[Shift] +[Esc]. Press these three buttons simultaneously to open the interface. Alternatively, you can also use the Windows search: Simply enter the term “Task Manager” and then click on “View running processes with Task Manager.”

To use the task manager to empty the working memory under Windows 7 and other versions select the “processes” tab:

Now go through the list of active processes and search for those that you do not need – for example, because you have already closed the program. Select the corresponding processes with a left or right click and press “end task” to close them permanently and clean up the working memory piece by piece.

Empty memory via script: the necessary steps

An interesting alternative to memory management via the task manager is to write a script that frees up a specified amount of RAM when it is executed. That sounds like a complex task at first glance – but you don't need any programming experience. A small entry in a simple text document created for this purpose is completely sufficient. To create a script to clear the RAM, proceed as follows:

Create a new text document by right-clicking on your desktop and selecting “new” and “text document” in the pop-up menu:

Open the created document and insert the following line of text:

Then save the file under the desired name. Make sure that ANSI is set as the encoding form if the editor offers an appropriate option. The last step is to replace the default extension .txt with the extension .vbs. Only in this way can Windows determine that the file is a script.

You can now execute the script simply by double-clicking it. The code proposed here automatically releases 32 megabytes of main memory, and this process can be repeated as often as required. Of course you can also adjust the amount and empty 128 megabytes (“Space(128000000)”). However, the value should never exceed half of the built-in memory size – otherwise there is a risk of program errors or even system crashes.

How to clear RAM with external tools

If you want to use an external solution instead of the system-internal possibilities for memory cleaning, this is also possible without problems: there are various programs that were developed especially for this purpose and are mostly freeware. One of the most popular tools of this kind is Wise Memory Optimiser. The program by the developer company WiseCleaner is completely free of charge and available for all current Windows systems. After you install and start Wise Memory Optimizer, you will be taken to the main screen of the application, which displays both the occupied and free memory. With a single click on “Optimize Now” you can use the tool to empty the memory under Windows XP up to 10.

Under the tab “settings” (the gear symbol), you can activate auto-optimization. Use the slider to specify how much should be cleared from the RAM automatically (for example, if less than 1280 MB is free, then the RAM should be optimized).

As an alternative to Wise Memory Optimizer, you can also use the tools RAMRush or Mz RAM Booster to clear your RAM.

Related articles