这样,我们就创建了一个内存映射文件。
This will create the memory mapped file but to start using it we will need a map view.
段3预留给内存映射文件,即mmap。
为内存映射文件提供内存分配选项。
在这里,内核直接到内存映射文件的内容。
创建合适的流之后,现在就可以创建内存映射文件了。
With the stream in place, we can now create the memory mapped file. Let's see an example.
在系统内存中创建或打开一个内存映射文件。
Creates or opens a memory-mapped file that has the specified capacity and access type in system memory.
公共语言运行时不具备创建内存映射文件的权限。
The common language runtime does not have permissions to create memory-mapped files.
高性能(支持SendFileAPI和内存映射文件)。
High performance (SendFile API support and memory-mapped files).
性能计数器使用内存映射文件或共享内存发布性能数据。
Performance counters use a memory mapped file, or Shared memory, to publish performance data.
内存映射文件是把一块内存连接到一个文件的操作系统特性。
Memory-mapped files are an operating system feature that links a block of memory to a file.
为了帮助改善启动时间,JVM现在和内存映射文件一起工作。
To help improve startup time, the JVM now works with memory-mapped files.
逻辑,元素,内存映射文件,等“其他人”,即使那个人是你。
Logic, elements, memory map, etc. Document for "the other person", even if that person is YOU.
可使用此方法返回的流顺序访问内存映射文件,如如进程间通信。
You can use the stream returned by this method for sequential access to a memory-mapped file, such as for inter-process communications.
顾名思义,一个内存映射文件将一个类似文件的结构映射到内存的地址中。
As the name implies, a memory-mapped file maps a file-like construct to an address in memory.
在这里我用两个相同的应用程序的不同实例来读写数据从内存映射文件。
Here I am using two different instances of same application to read write data from memory mapped file.
包括读写文本文件的便捷方法,快速地列举目录,对内存映射文件的支持。
These include convenience methods for reading and writing text-based files, significantly faster directory enumeration, and support for memory mapped files.
在处理巨型文件时,真正的开发人员会转而使用一种技术,名为内存映射文件。
When working with very large files, native developers turn to a technique known as Memory-Mapped files.
这样,在启动J VM时,就不会从头开始装入系统类,而是装入内存映射文件。
Then, when it is time to start the JVM, instead of loading the system classes from scratch, the memory-mapped files are loaded.
如果我们想要探究内存映射文件结构的话,不需要构造一个流,只要找到该资源的名字即可。
If we explore the construction of the memory mapped file we can see that there is no stream, we just name the resource.
其它进程如何读取该内存映射文件的内容呢。 一样,我们先创建一个内存映射文件。
Now if we want to read from it, the other process needs also to create a memory mapped file, we can use the other static initialize that opens an existing one or creates one if it does not exist.
在本文后面,我将讨论第8种类型MappedByteBuffer,它用于内存映射文件。
I'll discuss an eighth type, MappedByteBuffer, available for memory-mapped files, later in this article.
使用内存映射文件技术及多线程调度技术,用于管理和调度大数据量地形数据和纹理数据。
Using Memory Map File and Multi-thread dispatch technology, to manage and dispatch large terrain data and texture data.
在阅读完本文之后,您应该了解了NIO从基本的get和put操作到读取内存映射文件方面的知识。
After reading this article, you should understand NIO, from basic get and put operations to reading a memory-mapped file.
在BCL的下一个版本中,. NET开发人员将能够直接使用内存映射文件,而无需通过平台调用的方式。
With the next version of the BCL,.net developers will be able to use memory-mapped files directly instead of via platform invoke calls.
如果我们现在就要从内存映射文件读或写信息,只需要调用带有正确偏移量的映射视图方法就行了。
If we need now to write or read information from it we just call the map view methods with the correct offset.
如何访问文件就跟前述的示例一样了。千万记住,如果你关闭了内存映射文件,那么它就不能访问了。
The access to the file USES the same syntax as the previous example, remember that if you close the memory mapped file this will be non accessible, this issue catches many developer.
如果两个应用程序打开了同一个内存映射文件,那么某个应用程序做出的改变会立即反映给另外一个应用程序。
If two applications open the same memory-mapped file, changes made by one application will be immediately visible to the other application.
最后,让我们来看一下另外一个有意思的领域:创建多个映射视图。它们同时工作访问同一个内存映射文件的不同区域。
Finally, another interesting area is the creation of multiple map views, these can work on the same memory mapped file accessing different areas of the files.
但是这种方法有个小小的缺点,这和内存映射文件的大小有关。如果事先不知道大小的话,为了以防万一,你可能会构造一个超级大的文件。
Now, there is a small drawback with this approach and is related to the size of the memory mapped file.
还可以把文件映射到内存,这是加快数据访问的理想解决方案。
You can map files into memory, as well-an ideal solution for accelerating data access.
应用推荐