How can I use memory mapped files for interprocess communication?

.Net 4 will have brilliant support for memory mapped files. The two main apps are listed on different blogs ( http://blogs.msdn.com/salvapatuel/archive/2009/06/08/working-with-memory-mapped-files-in-net-4.aspx ):

1) editing large files,

2) interprocess communication.

I'm already using WCF over named pipes for interprocess communication.

Can someone please explain to me / provide an example of how I can achieve similar functionality using memory mapped files? For example, I want to call one method from one process that will be executed in another process and the results will be "sent" / available during the call process.

+2


source to share


1 answer


With IPC, you need to serialize / deserialize the data before passing it every time you call the method. In MMF, you will still use IPC for notifications, however, you will no longer pass serialized data, but instead memory descriptors. This can provide significant performance gains when using big data as you save serialization / deserialization time and space.



+3


source







All Articles