| Previous | Next |
| STATUS_NOT_MAPPED_VIEW | STATUS_UNABLE_TO_DELETE_SECTION |
STATUS_UNABLE_TO_FREE_VM
The free operation does not match the allocation layout
Releasing and decommitting use different rules. MEM_RELEASE requires the original allocation base and a region size of zero, while MEM_DECOMMIT operates on committed pages within a reserved region. Mapped section views must be unmapped with their mapping API instead of being released as private virtual memory.
Preserve allocation metadata from the successful create call. Guessing the base or reconstructing it from an interior pointer is error-prone, especially when allocators split, merge, or protect subranges. Querying the region helps diagnose the mismatch but does not transfer ownership of it.
What to inspect
- Record base, size, allocation type, and the exact free flags used.
- Check whether the address belongs to a mapped view, heap, image, or private reservation.
- Verify the cleanup call uses the original allocation base when releasing the whole reservation.
References
- Microsoft: VirtualFree
- Microsoft WDK: NtFreeVirtualMemory
- Microsoft: VirtualQuery
- ReactOS source: virtual memory manager
- Microsoft Open Specifications: NTSTATUS values
Looking for a different code? Search another status or error code.