Memory map file IO

zhaozj2021-02-16  91

Memory mapping file I / O is a method of reading and writing file data, which can be much more faster than conventional stream-based or channel-based I / O. The memory map file I / O is done by making the data in the file magic as the content of the memory array. It seems to be in memory, but it is not true that the entire file is read in memory. In general, only parts actually read or written in the file are sent (or map) to memory. Memory mapping is not really magical or unusual. Modern operating systems generally map part of the part of the file into memory as needed, thereby implementing the file system. The Java memory mapping mechanism is only available when this mechanism can be employed in the underlying operating system. Although the creation of the memory map file is quite simple, it may be dangerous to it. Just change the simple operation of the individual elements of the array, you may directly modify the files on the disk. Modifying the data is not separated from the disk to the disk.

转载请注明原文地址:https://www.9cbs.com/read-15252.html

New Post(0)