0XC0000206

STATUS_INVALID_BUFFER_SIZE (0xC0000206): Fixing the Buffer Size Error

A buffer size mismatch crashes apps or system calls. Rebuild your pagefile or fix memory allocation to resolve it.

What you're seeing, and why it sucks

You get STATUS_INVALID_BUFFER_SIZE (0xC0000206) when an app or system call tries to use a buffer that's too small or misaligned. It usually happens during file operations, memory dumps, or when an app tries to read a file that's larger than the buffer it allocated. The error message is vague — "The size of the buffer is invalid for the specified operation" — but the underlying cause is almost always a corrupted pagefile or a bad memory allocation in a driver or low-level library.

The fix: rebuild the pagefile

Skip the registry tweaks and driver reinstall suggestions you see elsewhere. The real fix is resetting the pagefile. Here's why: Windows uses the pagefile as a backing store for memory-mapped files and buffer allocations. When the pagefile header gets corrupted — often after an improper shutdown or disk error — the system can't verify buffer sizes correctly, throwing 0xC0000206.

  1. Open System Properties: press Win + Pause/Break, then click "Advanced system settings". Or run sysdm.cpl and go to the Advanced tab.
  2. Under Performance, click "Settings", then go to the Advanced tab.
  3. Under Virtual memory, click "Change".
  4. Uncheck "Automatically manage paging file size for all drives".
  5. Select your system drive (usually C:), choose "No paging file", and click "Set". You'll get a warning — click Yes.
  6. Click OK, then OK again. Reboot when prompted.
  7. After reboot, go back to the same location, select C:, choose "System managed size", click "Set", then OK. Reboot once more.

That's it. You've just forced Windows to delete the old pagefile.sys and create a fresh one. The new file will have a clean header, and the buffer size checks will pass.

Why this works

The pagefile is a hidden system file — C:\pagefile.sys — that acts as virtual RAM. When an app requests a buffer, the memory manager allocates it either in physical RAM or pages it out to the pagefile. The error 0xC0000206 happens when the memory manager tries to validate the buffer size against the pagefile's internal structure and finds a mismatch. A corrupted pagefile header will cause this exact check to fail.

Resetting the pagefile forces the memory manager to rebuild the header from scratch. The new header will correctly reflect the disk cluster size and system architecture (32-bit vs 64-bit), so buffer size calculations match again.

Less common variations

Sometimes the pagefile isn't the culprit. Here are two other scenarios where 0xC0000206 shows up:

1. Bad registry key for memory allocation

Check HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management for PagedPoolSize or NonPagedPoolSize. If these are set to a tiny value (like 0 or less than 256MB), the kernel can't allocate internal buffers. Delete the key or set it to 0xFFFFFFFF (default). Reboot to apply.

2. Corrupt system file in a memory-mapped scenario

If the error happens only when opening a specific file (say, a large Excel or Photoshop file), the file itself might have a corrupt header. Run sfc /scannow to check system files, but more often the fix is to copy the file to another drive and open it from there. If it opens fine, the original disk has bad sectors. Run chkdsk /f /r on that drive.

Prevention

Three things will keep 0xC0000206 from coming back:

  • Never hard shutdown. Always use Start > Shut down, not the power button. Abrupt power loss is the #1 cause of pagefile corruption.
  • Keep at least 10% free space on your system drive. Windows needs room to extend the pagefile dynamically. When it can't, the header can get truncated.
  • Uninstall memory tweaking tools. Apps that modify pagefile size automatically (like some game boosters or RAM cleaners) often leave the header in an inconsistent state. Manage the pagefile manually if you need to change it.

That's the full picture. Start with the pagefile rebuild — it fixes 9 out of 10 cases of 0xC0000206. If it doesn't, check the registry keys and disk health next.

Related Errors in Windows Errors
0XC0000143 Fix 0xC0000143 Missing System File Error on Windows 0X00002105 Fix ERROR_DS_DRA_ACCESS_DENIED (0X00002105) on Domain Controller 0X000005DE Fixing ERROR_LOG_FILE_FULL (0X000005DE) on Windows 0X0000009F ERROR_BAD_THREADID_ADDR (0X0000009F) Fix: Bad Thread ID Address

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.