System.Core 4.0.0.0 System.Object System.IDisposable

A memory-mapped file maps the contents of a file to an application’s logical address space. Memory-mapped files enable programmers to work with extremely large files because memory can be managed concurrently, and they allow complete, random access to a file without the need for seeking. Memory-mapped files can also be shared across multiple processes.

The methods create a memory-mapped file from a specified path or a of an existing file on disk. Changes are automatically propagated to disk when the file is unmapped.

The methods create a memory-mapped file that is not mapped to an existing file on disk; and are suitable for creating shared memory for interprocess communication (IPC).

A memory-mapped file is associated with a name.

You can create multiple views of the memory-mapped file, including views of parts of the file. You can map the same part of a file to more than one address to create concurrent memory. For two views to remain concurrent, they have to be created from the same memory-mapped file. Creating two file mappings of the same file with two views does not provide concurrency.

Represents a memory-mapped file.

- Method
  4.0.0.0
  System.IO.MemoryMappedFiles.MemoryMappedFile `` To be added.

  Creates a memory-mapped file from a file on disk.

  A memory-mapped file.

  The path to file to map.
- Method
  4.0.0.0
  System.IO.MemoryMappedFiles.MemoryMappedFile `` ``

  The parameter pertains to the source file on disk. You can use only the enumeration value to create the memory-mapped file from the source file on disk.

  Creates a memory-mapped file that has the specified access mode from a file on disk.

  A memory-mapped file that has the specified access mode.

  The path to file to map. Access mode; must be .
- Method
  4.0.0.0
  System.IO.MemoryMappedFiles.MemoryMappedFile `` `` ``

  The parameter pertains to the source file on disk. You can use only the enumeration value to create the memory-mapped file from the source file on disk.

  Creates a memory-mapped file that has the specified access mode and name from a file on disk.

  A memory-mapped file that has the specified name and access mode.

  The path to the file to map. Access mode; must be . A name to assign to the memory-mapped file.
- Method
  4.0.0.0
  System.IO.MemoryMappedFiles.MemoryMappedFile `` `` `` ``

  The parameter pertains to the source file on disk.

  If is larger than the size of the file on disk, the file on disk is increased to match the specified capacity even if no data is written to the memory-mapped file. To prevent this from occurring, specify 0 (zero) for the default capacity, which will internally set to the size of the file on disk.

  Creates a memory-mapped file that has the specified access mode, name, and capacity from a file on disk.

  A memory-mapped file that has the specified characteristics.

  The path to the file to map. Access mode; can be any of the enumeration values except . A name to assign to the memory-mapped file. The maximum size, in bytes, to allocate to the memory-mapped file. Specify 0 to set the capacity to the size of the file on disk.
- Method
  4.0.0.0
  System.IO.MemoryMappedFiles.MemoryMappedFile `` `` `` `` ``

  The parameter pertains to the source file on disk.

  If is larger than the size of the file on disk, the file on disk is increased to match the specified capacity even if no data is written to the memory-mapped file. To prevent this from occurring, specify 0 (zero) for the default capacity, which will internally set to the size of the file on disk.

  Creates a memory-mapped file that has the specified access mode, name, capacity, and access type from a file on disk.

  A memory-mapped file that has the specified characteristics.

  The path to the file to map. Access mode; can be any of the enumeration values except . A name to assign to the memory-mapped file. The maximum size, in bytes, to allocate to the memory-mapped file. Specify 0 to set the capacity to the size of the file on disk. One of the enumeration values that specifies the type of access allowed to the memory-mapped file.
- Method
  4.0.0.0
  System.MonoLimitation("memoryMappedFileSecurity is currently ignored")
  System.IO.MemoryMappedFiles.MemoryMappedFile `` `` `` `` `` `` ``

  If is larger than the size of the file on disk, the file on disk is increased to match the specified capacity even if no data is written to the memory-mapped file. To prevent this from occurring, specify 0 (zero) for the default capacity, which will internally set to the size of the file on disk.

  Creates a memory-mapped file that has the specified name, capacity, access type, security permissions, inheritability, and disposal requirement from a file on disk.

  A memory-mapped file that has the specified characteristics.

  The to the file to map. A name to assign to the memory-mapped file. The maximum size, in bytes, to allocate to the memory-mapped file. Specify 0 to set the capacity to the size of the file on disk. One of the enumeration values that specifies the type of access allowed to the memory-mapped file. The default is . The permissions that can be granted for file access and operations on memory-mapped files. One of the enumeration values that specifies whether a handle to the memory-mapped file can be inherited by a child process. The default is . true to not dispose after the is closed; false to dispose .
- Method
  4.0.0.0
  System.MonoLimitation("CreateNew requires that mapName be a file name on Unix")
  System.IO.MemoryMappedFiles.MemoryMappedFile `` ``

  Use this method to create a memory-mapped file that is not persisted (that is, not associated with a file on disk), which you can use to share data between processes.

  Creates a memory-mapped file that has the specified capacity in system memory.

  A memory-mapped file that has the specified name and capacity.

  A name to assign to the memory-mapped file. The maximum size, in bytes, to allocate to the memory-mapped file.
- Method
  4.0.0.0
  System.MonoLimitation("CreateNew requires that mapName be a file name on Unix")
  System.IO.MemoryMappedFiles.MemoryMappedFile `` `` ``

  Use this method to create a memory-mapped file that is not persisted (that is, not associated with a file on disk), which you can use to share data between processes.

  Creates a memory-mapped file that has the specified capacity and access type in system memory.

  A memory-mapped file that has the specified characteristics.

  A name to assign to the memory-mapped file. The maximum size, in bytes, to allocate to the memory-mapped file. One of the enumeration values that specifies the type of access allowed to the memory-mapped file. The default is .
- Method
  4.0.0.0
  System.MonoLimitation("CreateNew requires that mapName be a file name on Unix; options and memoryMappedFileSecurity are ignored")
  System.IO.MemoryMappedFiles.MemoryMappedFile `` `` `` `` `` ``

  Use this method to create a memory-mapped file that is not persisted (that is, not associated with a file on disk), which you can use to share data between processes.

  Creates a memory-mapped file that has the specified capacity, access type, memory allocation, security permissions, and inheritability in system memory.

  A memory-mapped file that has the specified characteristics.

  A name to assign to the memory-mapped file. The maximum size, in bytes, to allocate to the memory-mapped file. One of the enumeration values that specifies the type of access allowed to the memory-mapped file. The default is . A bitwise combination of enumeration values that specifies memory allocation options for the memory-mapped file. The permissions that can be granted for file access and operations on memory-mapped files. One of the enumeration values that specifies whether a handle to the memory-mapped file can be inherited by a child process. The default is .
- Method
  4.0.0.0
  System.MonoLimitation("CreateOrOpen requires that mapName be a file name on Unix")
  System.IO.MemoryMappedFiles.MemoryMappedFile `` ``

  Use this method to create or open a memory-mapped file that is not persisted (that is, not associated with a file on disk), which you can use to share data between processes.

  Creates or opens a memory-mapped file that has the specified capacity in system memory.

  A memory-mapped file that has the specified name and size.

  A name to assign to the memory-mapped file. The maximum size, in bytes, to allocate to the memory-mapped file.
- Method
  4.0.0.0
  System.MonoLimitation("CreateOrOpen requires that mapName be a file name on Unix")
  System.IO.MemoryMappedFiles.MemoryMappedFile `` `` ``

  Use this method to create or open a memory-mapped file that is not persisted (that is, not associated with a file on disk), which you can use to share data between processes.

  Creates or opens a memory-mapped file that has the specified capacity and access type in system memory.

  A memory-mapped file that has the specified characteristics.

  A name to assign to the memory-mapped file. The maximum size, in bytes, to allocate to the memory-mapped file. One of the enumeration values that specifies the type of access allowed to the memory-mapped file. The default is .
- Method
  4.0.0.0
  System.MonoTODO
  System.IO.MemoryMappedFiles.MemoryMappedFile `` `` `` `` `` ``

  Use this method to create or open a memory-mapped file that is not persisted (that is, not associated with a file on disk), which you can use to share data between processes.

  Creates or opens a memory-mapped file that has the specified capacity, access type, memory allocation, security permissions, and inheritability in system memory.

  A memory-mapped file that has the specified characteristics.

  A name to assign to the memory-mapped file. The maximum size, in bytes, to allocate to the memory-mapped file. One of the enumeration values that specifies the type of access allowed to the memory-mapped file. The default is . A bitwise combination of enumeration values that specifies memory allocation options for the memory-mapped file. The permissions that can be granted for file access and operations on memory-mapped files. One of the enumeration values that specifies whether a handle to the memory-mapped file can be inherited by a child process. The default is .
- Method
  4.0.0.0
  System.IO.MemoryMappedFiles.MemoryMappedViewAccessor

  You can use the view returned by this method for random access to a memory-mapped file.

  Creates a that maps to a view of the memory-mapped file.

  A randomly accessible block of memory.

- Method
  4.0.0.0
  System.IO.MemoryMappedFiles.MemoryMappedViewAccessor `` ``

  You can use the view returned by this method for random access to a memory-mapped file.

  To create a complete view of the memory-mapped file, specify 0 (zero) for the parameter. If you do this, the size of the view might be smaller or larger than the size of the source file on disk. This is because views are provided in units of system pages, and the size of the view is rounded up to the next system page size.

  Creates a that maps to a view of the memory-mapped file, and that has the specified offset and size.

  A randomly accessible block of memory.

  The byte at which to start the view. The size of the view. Specify 0 (zero) to create a view that starts at and ends approximately at the end of the memory-mapped file.
- Method
  4.0.0.0
  System.IO.MemoryMappedFiles.MemoryMappedViewAccessor `` `` ``

  You can use the view returned by this method for random access to a memory-mapped file.

  To create a complete view of the memory-mapped file, specify 0 (zero) for the parameter. If you do this, the size of the view might be smaller or larger than the size of the source file on disk. This is because views are provided in units of system pages, and the size of the view is rounded up to the next system page size.

  Creates a that maps to a view of the memory-mapped file, and that has the specified offset, size, and access restrictions.

  A randomly accessible block of memory.

  The byte at which to start the view. The size of the view. Specify 0 (zero) to create a view that starts at and ends approximately at the end of the memory-mapped file. One of the enumeration values that specifies the type of access allowed to the memory-mapped file. The default is .
- Method
  4.0.0.0
  System.IO.MemoryMappedFiles.MemoryMappedViewStream

  You can use the stream returned by this method for sequential access to a memory-mapped file, such as for inter-process communications.

  Creates a stream that maps to a view of the memory-mapped file.

  A stream of memory.

- Method
  4.0.0.0
  System.IO.MemoryMappedFiles.MemoryMappedViewStream `` ``

  You can use the stream returned by this method for sequential access to a memory-mapped file, such as for inter-process communications.

  To create a complete view of the memory-mapped file, specify 0 (zero) for the parameter. If you do this, the size of the view might be smaller or larger than the size of the source file on disk. This is because views are provided in units of system pages, and the size of the view is rounded up to the next system page size.

  Creates a stream that maps to a view of the memory-mapped file, and that has the specified offset and size.

  A stream of memory that has the specified offset and size.

  The byte at which to start the view. The size of the view. Specify 0 (zero) to create a view that starts at and ends approximately at the end of the memory-mapped file.
- Method
  4.0.0.0
  System.IO.MemoryMappedFiles.MemoryMappedViewStream `` `` ``

  You can use the stream returned by this method for sequential access to a memory-mapped file, such as for inter-process communications.

  To create a complete view of the memory-mapped file, specify 0 (zero) for the parameter. If you do this, the size of the view might be smaller or larger than the size of the source file on disk. This is because views are provided in units of system pages, and the size of the view is rounded up to the next system page size.

  Creates a stream that maps to a view of the memory-mapped file, and that has the specified offset, size, and access type.

  A stream of memory that has the specified characteristics.

  The byte at which to start the view. The size of the view. Specify 0 (zero) to create a view that starts at and ends approximately at the end of the memory-mapped file. One of the enumeration values that specifies the type of access allowed to the memory-mapped file. The default is .
- Method
  4.0.0.0
  System.Void To be added.

  Releases all resources used by the .

- Method
  4.0.0.0
  System.Void `` To be added.

  Releases the unmanaged resources used by the and optionally releases the managed resources.

  true to release both managed and unmanaged resources; false to release only unmanaged resources.
- Method
  4.0.0.0
  System.MonoTODO
  System.IO.MemoryMappedFiles.MemoryMappedFileSecurity To be added.

  Gets the access control to the memory-mapped file resource.

  The permissions that can be granted for file access and operations on memory-mapped files.

- Method
  4.0.0.0
  System.MonoTODO
  System.IO.MemoryMappedFiles.MemoryMappedFile ``

  The memory-mapped file can be either a persisted memory-mapped file (associated with a file on disk) or non persisted.

  Opens an existing memory-mapped file that has the specified name in system memory.

  A memory-mapped file that has the specified name.

  The name of the memory-mapped file to open.
- Method
  4.0.0.0
  System.MonoTODO
  System.IO.MemoryMappedFiles.MemoryMappedFile `` `` To be added.

  Opens an existing memory-mapped file that has the specified name and access rights in system memory.

  A memory-mapped file that has the specified characteristics.

  The name of the memory-mapped file to open. One of the enumeration values that specifies the access rights to apply to the memory-mapped file.
- Method
  4.0.0.0
  System.MonoTODO
  System.IO.MemoryMappedFiles.MemoryMappedFile `` `` `` To be added.

  Opens an existing memory-mapped file that has the specified name, access rights, and inheritability in system memory.

  A memory-mapped file that has the specified characteristics.

  The name of the memory-mapped file to open. One of the enumeration values that specifies the access rights to apply to the memory-mapped file. One of the enumeration values that specifies whether a handle to the memory-mapped file can be inherited by a child process. The default is .
- Property
  4.0.0.0
  System.MonoTODO
  Microsoft.Win32.SafeHandles.SafeMemoryMappedFileHandle To be added. To be added.

  Gets the file handle of a memory-mapped file.

- Method
  4.0.0.0
  System.MonoTODO
  System.Void `` To be added.

  Sets the access control to the memory-mapped file resource.

  The permissions that can be granted for file access and operations on memory-mapped files.