Is it possible to access a memory-mapped file in a C++ program to the page file from MATLAB?

1 Ansicht (letzte 30 Tage)
I am trying to use the MEMMAPFILE function to open an anonymous C++ memory map in MATLAB, but am unable to do so. I am using 'CreateFileMapping' (from the Microsoft Windows API) to keep the memory map out of the file system and in the page file instead. There is a mapping object that has a name and lives in memory, but no actual disk file.
'CreateFileMapping' is an operating system function that is documented on the MSDN website at:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/createfilemapping.asp>
At the bottom of that page, there is an example named 'Creating Named Shared Memory' that my code is closely modeled on. A direct link to that example is:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/creating_named_shared_memory.asp>
I would like to access this memory map from MATLAB.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 27 Jun. 2009
The ability to read or write to an anonymous memory map in the page file is not available in MATLAB.
MATLAB functions for memory mapping are limited to MEMMAPFILE. MEMMAPFILE maps a saved disk file and cannot be used to access an anonymous memory map in the page file.

Weitere Antworten (0)

Kategorien

Mehr zu External Language Interfaces finden Sie in Help Center und File Exchange

Produkte


Version

R2006b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by