views:

86

answers:

2

I was wondering how can I make the IO faster by writing and reading temporary files to main memory. I've used to write to /dev/shm in Linux.

But now I'm in Windows 7. Anyone knows the answer ?

Thanks

+4  A: 

Hi.

If I understood it correctly (based on this post) what you are looking for is Memory Mapped Files.

Vagaus
+1  A: 

You can use CreateFile() with FILE_ATTRIBUTE_TEMPORARY, and Windows should try to keep it in cache as much as possible.

Justin Frankel
What I wanted is a nonprogramming way. Just like writing regular files in specific directory.
ablimit