Main Content

Speicherzuordnung

Zuordnen von Dateidaten zum Speicher für einen schnelleren Zugriff

Speicherzuordnung ist ein Mechanismus, der eine Datei oder einen Teil einer Datei auf der Festplatte einem Adressbereich in einem Adressraum der Anwendung zuordnet. Verwenden Sie die Speicherzuordnung, wenn Sie einen Direktzugriff auf große Dateien wünschen oder häufig auf kleine Dateien zugreifen. Zudem ermöglicht die Speicherzuordnung einen Zugriff auf Dateidaten über standardmäßige Indizierungsoperationen in MATLAB®. Weitere Informationen finden Sie unter Overview of Memory-Mapping.

Funktionen

memmapfileCreate memory map to a file

Themen

  • Overview of Memory-Mapping

    Memory-mapping is a mechanism that maps a portion of a file, or an entire file, on disk to a range of addresses within an application's address space.

  • Map File to Memory

    Suppose you want to create a memory map for a file named records.dat, using the memmapfile function.

  • Read from Mapped File

    This example shows how to create two different memory maps, and then read from each of the maps using the appropriate syntax.

  • Write to Mapped File

    This example shows how to create three different memory maps, and then write to each of the maps using the appropriate syntax.

  • Delete Memory Map

    To clear a memmapfile object from memory, do any of the following:

  • Share Memory Between Applications

    This example shows how to implement two separate MATLAB processes that communicate with each other by writing and reading from a shared file.