| Previous | Next |
| STATUS_RXACT_COMMIT_FAILURE | STATUS_TOO_MANY_OPENED_FILES |
STATUS_MAPPED_FILE_SIZE_ZERO
There is no extent available for the file mapping object
A file mapping object needs a nonzero extent. If the backing file is empty and the requested maximum size is also zero, Windows cannot infer a usable section size. This differs from mapping an existing nonempty file with a zero view length, which can mean map the remainder under documented API rules.
Decide whether the application should extend the file, create a page-file-backed mapping, or treat an empty file as valid input without mapping it. Extending the file changes persistent state and should not be done merely to suppress the error unless the file format permits it.
What to inspect
- Record current file size and the high and low maximum-size arguments.
- Check whether another thread truncated or replaced the file before section creation.
- Choose explicit empty-file handling instead of relying on ambiguous zero-size behavior.
References
- Microsoft: File mapping
- Microsoft: MapViewOfFile
- Microsoft: Creating a file view
- Microsoft Open Specifications: NTSTATUS values
Looking for a different code? Search another status or error code.
