My understanding of how memory mapped files work in C# is that every request for data results in a copy. For instance, if you had a large data structure persisted as a file
You can use unsafe code to directly access the mapped memory. I suggest you look into "blittable structs" which are struct types which can be copied around in memory without modification. Here is an example:
struct MyDataRecord { public int X, Y; }
...
for (var i = 0 .. 10) {
((MyDataRecord*)pointerToUnmanagedMemory)[i] = new MyDataRecord() { X = i, Y = i * i };
}
This is very performant and kind of convenient.