In-Memory File System for WIndows

2019-02-10 09:51发布

问题:

I have a command-line executable which I need to run from Java on Windows XP. It uses files as input and output. But I want to avoid the overhead of file IO, so I thought of an in-memory RAM file system.

NetBSD has mount_mfs.

Could you recommend the most convenient way of doing this?

回答1:

You should also consider whether you really need this (premature optimization, yadda, yadda). On all modern operating systems, filesystem I/O is cached anyway, so frequently-used files are essentially as fast as a RAM disk.

Related question (with many good answers): RAM drive for compiling - is there such a thing?



回答2:

Commons VFS provides handy interfaces to virtual filesystems, inclunding in-memory file system.