You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/en-US/01-02-mmap-file.smd
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,12 @@
5
5
.layout = "section.shtml",
6
6
---
7
7
8
-
Creates a memory map of a file using [mmap](https://man7.org/linux/man-pages/man2/mmap.2.html) and simulates some non-sequential reads from the file. Using a memory map means you just index into a slice rather than having to deal with seek to navigate a file.
8
+
Creates a memory map of a file and simulates some non-sequential reads from the file. Using a memory
9
+
map means you just index into a slice rather than having to deal with seek to navigate a file.
10
+
11
+
This uses [NtCreateSection](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntcreatesection)
12
+
and [NtMapViewOfSection](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-zwmapviewofsection)
13
+
on Windows, and [mmap](https://man7.org/linux/man-pages/man2/mmap.2.html) on other operating
14
+
systems that support it (When using [`std.Io.Threaded`](https://codeberg.org/ziglang/zig/src/commit/9908b10d928a12731a288bd59068151d386efdac/lib/std/Io/Threaded.zig#L18222-L18355)).
0 commit comments