MemoryMappedFile.CreateFromFile enforces a variety of constraints about the target file. Those constraints make sense when working with disk-based files, but they don't all make sense when working with special files. For example, it should be possible to create a map for /dev/mem, but such a special file has zero length, which causes a bunch of the checks in both MemoryMappedFile and MemoryMappedView to fail.