Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# accessing memory map file

Tags:

c#

memory

Looking for code samples to access a memory map file in C#

like image 925
leora Avatar asked Nov 29 '22 05:11

leora


2 Answers

Looks like C# 4.0 will have MemoryMappedFile support in the library

like image 63
leora Avatar answered Nov 30 '22 18:11

leora


You can take a look at this CodeProject article which shows a simple array over MMF implementation using Winterdom's FileMap library - basically a wrapper around the Win32 APIs for memory mapped files.

Caveat emptor: 1) I have not used FileMap, so I can't vouch for it; 2) FileMap is under LGPL, if the licensing terms are of any concer of you.

You can also search on http://pinvoke.net for the P/Invoke definitions of the corresponding Win32 APIs and roll your own implementation.

like image 45
Franci Penov Avatar answered Nov 30 '22 20:11

Franci Penov