STATUS_NOT_LOCKED (0xC000002A) Fix: Unlocking Memory That Wasn't Locked
This error pops up when software tries to unlock a memory page it never locked. Usually a driver bug or corrupted system file. Quickest fix is a clean boot or SFC scan.
You're Not Alone — This Error Means the OS Caught a Bug
If you're staring at a blue screen or event log entry with STATUS_NOT_LOCKED (0xC000002A), you're probably frustrated because nothing obvious broke. But this error has a clear cause: a program tried to unlock a memory page that was never locked in the first place. The system's memory manager won't allow that — and rightly so. Let's get this fixed.
The Fastest Fix: Clean Boot or SFC Scan
I've seen this most often with printer drivers, old antivirus software, or custom device drivers. Had a client last month whose entire print queue died because a Brother printer driver had a memory management bug. Here's what to do:
Step 1: Run System File Checker (SFC)
Corrupted system files can cause this. Open an admin command prompt (Windows Key + X, then select Command Prompt or Terminal as Admin) and run:
sfc /scannow
Let it finish. If it finds corruption and fixes it, reboot and test. This alone fixes maybe 20% of cases.
Step 2: Clean Boot to Find the Culprit
If SFC didn't work, the culprit is likely a third-party driver or service. Here's how to clean boot:
- Press Windows Key + R, type
msconfig, hit Enter. - Go to the Services tab, check Hide all Microsoft services, then click Disable all.
- Go to the Startup tab, click Open Task Manager, and disable everything there.
- Click OK, restart.
If the error disappears, re-enable services one by one until it comes back. That's your troublemaker. I've seen Malwarebytes and VMware tools trigger this exact error. Uninstall or update the offending software.
Why This Happens — The Technical Bit
Windows uses a function called VirtualUnlock (or its kernel-mode equivalent) to release memory pages locked via VirtualLock. Locking ensures a page stays in physical RAM and isn't paged to disk. If a driver or app calls VirtualUnlock on a page that was never locked — or was already unlocked — you get STATUS_NOT_LOCKED. It's like trying to close a door that's already open. The system throws the error to protect memory integrity.
The usual causes:
- Race conditions in a driver — two threads trying to manage the same memory page.
- Corrupted driver code — especially for network, storage, or printer drivers.
- Heap corruption from a bad
malloc/freepair in a system-level component.
Less Common Variations & Their Fixes
Sometimes the error isn't a simple driver conflict. Here are rarer cases I've seen:
Case 1: Bad Windows Update
Had a client whose Windows 10 machine started crashing after KB5005565. Rolled back the update and it stopped. Check your update history — if the error started after a recent update, uninstall it.
Case 2: Faulty RAM
I know, I know — everyone blames RAM. But once, a loose stick caused memory corruption that manifested as this error. Run Windows Memory Diagnostic (search for it in Start menu, let it run and reboot). If it finds errors, reseat or replace your RAM.
Case 3: Third-Party Overlay Apps
Discord overlays, MSI Afterburner, or even some game launchers can inject into processes and mess with memory locking. Uninstall or disable overlays temporarily.
Prevention — Keep It Clean
Once you've fixed it, here's how to keep it from coming back:
- Keep drivers updated — especially chipset, storage, and network drivers. Don't rely on Windows Update alone; check your motherboard or OEM's site.
- Uninstall junk software — especially anything that hooks into system processes (tune-up tools, old antivirus, printer bloatware).
- Run SFC monthly — I set a calendar reminder. Takes two minutes.
- Test RAM with MemTest86 once a year if you're a heavy user. Cheap insurance.
That's it. This error is annoying but rarely fatal. Clean boot, SFC, and a good driver sweep will sort out 90% of cases. If not, you're looking at a hardware issue or a very specific software bug — but that's the exception, not the rule.
Was this solution helpful?