'Fast interprocess communication in C# (for Windows X86-64)
Yet another question from C++ guy digging under C#.
This time its inter-process communication.
So in C++ you can use boost interprocess's memory mapped files for instance and it will end up being fast and robust.
C# gives this options. I want to know which one is the fastest. For instances I dig a little into File mapping and apparently it only gives you a higher level interaction over the memory region through MemporyMappedViewAccessor. So I have 2 questions.
- Is there a way to create a mapped region using File Mapping then get a byte* or void* to that memory and directly read/write? (Which I only assume will be faster than MemporyMappedViewAccessor. Pretty much what boost IPC lets you do)
- If the answer to #1 is no, which one from this list will be faster? (Assuming single producer and single consumer processes)
Solution 1:[1]
MapViewOfFile is what is used on Windows to create shared memory.
You can look at this example for some details.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Wisblade |
