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.
- Open System Properties: press Win + Pause/Break, then click "Advanced system settings". Or run
sysdm.cpland go to the Advanced tab. - Under Performance, click "Settings", then go to the Advanced tab.
- Under Virtual memory, click "Change".
- Uncheck "Automatically manage paging file size for all drives".
- Select your system drive (usually C:), choose "No paging file", and click "Set". You'll get a warning — click Yes.
- Click OK, then OK again. Reboot when prompted.
- 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.