Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I get a path for a Memory Mapped File? (.NET 4.0)

I want that a non-.NET application access a Memory Mapped file, but this application is not aware of the existence of Memory Mapped files, so I need the file path. It is possible?

like image 723
Jader Dias Avatar asked Jul 11 '09 22:07

Jader Dias


People also ask

What is memory-mapped file in C#?

A memory-mapped file is a feature of the Windows operating system which allows memory to be shared between two or more processes running on the same machine. It requires much less overhead than other methods of inter-process communication such as remoting or WCF.

Are memory mapped files faster?

Accessing memory mapped files is faster than using direct read and write operations for two reasons. Firstly, a system call is orders of magnitude slower than a simple change to a program's local memory.

What do you mean by mapping files into memory?

File mapping is the process of mapping the disk sectors of a file into the virtual memory space of a process. Once mapped, your app accesses the file as if it were entirely resident in memory.


1 Answers

They have some samples here.

EDIT

I think this would provide the answer. Basically, it would seem some sort of memory pointer is required for memory-mapped files, and not a file system path.

like image 160
Kenan E. K. Avatar answered Sep 22 '22 01:09

Kenan E. K.