TechAlpine – The Technology world

What is memory map file in java?

Ans :Memory map file in java is a low level concept to make file I/O more efficiently. Generally we use stream or buffer stream to do file I/O. Although buffered stream is widely used to increase the performance of file input and output, but memory mapping is the ultimate technique that can be used to increase the performance drastically. In memory map, the physical file is mapped with the memory and then the I/O is performed in the mapped memory directly. As a result the I/O is performed on the physical file itself. But you need to be careful about the memory usage. It is always recommended to map the memory in small chunks and then read/write on the file. It increases the performance and also releases the memory after use. If you want to map the entire big file into memory then it might hang the system itself

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 7 = 8

TechAlpine Books
-----------------------------------------------------------