Main Content

Mapping de la mémoire

Mapper les données de fichiers sur la mémoire pour y accéder plus rapidement

Le mapping de la mémoire est un mécanisme qui mappe tout ou partie d’un fichier sur disque sur une plage d’adresses dans l’espace d’adressage d’une application. Le mapping de la mémoire est utile pour accéder de manière aléatoire à des fichiers volumineux ou accéder fréquemment à de petits fichiers. Il permet en outre d’accéder aux données de fichiers à l’aide d’opérations d’indexation MATLAB® standard. Pour plus d’informations, consultez Overview of Memory-Mapping.

Fonctions

memmapfileCreate memory map to a file

Rubriques

  • 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.