开发者

How to create a RAM Drive in Windows 7 (Windows 2008 R2)?

开发者 https://www.devze.com 2023-01-28 05:39 出处:网络
This isn\'t necessarily a programming question, but I\'ve hit a performance bottleneck with disk IO and I\'d like to try writing and reading from RAM instead of th开发者_运维百科e hard drive. I want t

This isn't necessarily a programming question, but I've hit a performance bottleneck with disk IO and I'd like to try writing and reading from RAM instead of th开发者_运维百科e hard drive. I want to create my file in RAM and then run my application against it.

There are lots of tools for creating RAM drives. None of them seem to work for windows 2008 R2. Does anyone know if this is possible and if so how. Does anyone know of a tool that works?


Use Memory-Mapped Files to map the file into RAM (including memory backed to pagefile, if it's large. so be careful).

File mapping is the association of a file's contents with a portion of the virtual address space of a process. The system creates a file mapping object (also known as a section object) to maintain this association. A file view is the portion of virtual address space that a process uses to access the file's contents. File mapping allows the process to use both random input and output (I/O) and sequential I/O. It also allows the process to work efficiently with a large data file, such as a database, without having to map the whole file into memory.


whatever ram disk you choose to purchase or write, remember check if the ram disk driver responds the SetDispositionInformationFile call.


I ended up finding and using Vsuit Ramdisk (Server Edition). It works great but its not free.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号