# std.Io: introduce File.MemoryMap · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5a7dc4b0fae62c8b7ec798043c93e4d90704a638)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5a7dc4b0fae62c8b7ec798043c93e4d90704a638

Requested commit: 5a7dc4b0fae62c8b7ec798043c93e4d90704a638

Commit: 5a7dc4b0fae62c8b7ec798043c93e4d90704a638

Tree: b5e546447555e5b4a2bcd308af49d43b49f0b2b0

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Io: introduce File.MemoryMap

by defining the pointer contents to only be synchronized after explicit
sync points, makes it legal to have a fallback implementation based on
file operations while still supporting a handful of use cases for memory
mapping.

furthermore, it makes it legal for evented I/O implementations to use
evented file I/O for the sync points rather than memory mapping.

not yet done:
- implement checking the length when options.len is null
- some windows impl work
- some wasi impl work
- unit tests
- integration with compiler

```

## Parents

- [63f345a75afdf4f956b136c06776f109f5c567af](https://git.cafe/gitcafe/zig/commit/63f345a75afdf4f956b136c06776f109f5c567af?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5a7dc4b0fae62c8b7ec798043c93e4d90704a638?format=markdown)
