对于.NET可编程RAM磁盘API?可编程、磁盘、NET、API

2023-09-02 21:36:52 作者:醉眼看苍生

寻找RAM磁盘API(或相当于一套软件来实现)来存储文件/秒暂时用于硬盘的物理环境之外的读/写操作。

Looking for a RAM disk API (or equivalent set of software to implement) to store file/s temporarily for read/write operations outside the physical hard disk environment.

更新 .exe文件将被写入到RAM盘和执行。

update Exe files will be written to the RAM disk and executed.

推荐答案

一个RAM盘是一个操作系统级别的结构,因为它有实现文件系统和设备驱动程序来模拟一个磁盘。在图书馆的水平,你不能做到这一点。

A "RAM disk" is an operating system level construct, because it has to implement a file system and device driver to emulate a disk. You can't do this at a library level.

如果你想追求的操作系统级别,Windows自带的内置ramdisk.sys驱动程序。

If you want to pursue the OS level, Windows comes with a built-in ramdisk.sys driver.

否则,读文件到你的应用程序中的数据结构,将具有相同的性能特点与使用RAM磁盘。通常,RAM盘时,使用应用程序不知道的事实,这是运行关闭的RAM缓存文件。如果您的应用程序知道它要做到这一点其实只是读取数据到直接您的应用程序。

Otherwise, reading the files into a data structure in your application will have the same performance characteristics as using a RAM disk. Typically, a RAM disk is used when the application is unaware of the fact that it is running off of RAM cached files. If your application is aware of the fact that it wants to do this, just read in the data into your application directly.