| Previous | Next |
| STATUS_SERVICE_NOTIFICATION | STATUS_LOG_HARD_ERROR |
STATUS_WAS_LOCKED
The lock request overlapped an existing page lock
VirtualLock operates on pages, while callers often track byte ranges. Overlapping requests can therefore encounter pages that are already locked. This warning identifies the overlap so the caller does not assume that every page transitioned from unlocked to locked during this call.
Locking is limited by the process working-set policy and should be reserved for data whose paging latency is unacceptable. Repeatedly locking overlapping buffers without reference-counted ownership can make cleanup ambiguous: one component may unlock pages still expected by another.
What to inspect
- Round requested byte ranges to page boundaries when tracking lock ownership.
- Check for overlapping buffers and maintain a clear reference count or single owner.
- Measure the total locked set and working-set quota rather than retrying the same request.
References
- Microsoft: VirtualLock
- Microsoft: VirtualUnlock
- Microsoft: Process working sets
- Microsoft Open Specifications: NTSTATUS values
Looking for a different code? Search another status or error code.
