Reputation: 1087
I have a module load a file by its path, However I find it is slow. I want to accelerate it, Is there any technology in Windows to create a virtual memory file for the module?
Many thanks
Upvotes: 2
Views: 1621
Reputation: 145269
Assuming you're talking about memory mapped file, yes there are APIs for that. It's too much to discuss in a little SO answer, and besides it's many many years since I used so I don't even recall the function names. Here's how I found info on that quickly: http://www.google.com/search?q=memory+mapped+file+windows.
However, other simpler means are probably the answer to "I find it is slow".
There can be many different reasons for slowness. Please post some code. Then better answers can be given.
Cheer & hth.,
Upvotes: 0
Reputation: 490118
I'm not entirely sure of what you're asking, but if you just want to create a temporary file that will live in RAM (if possible), you can use CreateFile
with FILE_ATTRIBUTE_TEMPORARY
.
Upvotes: 3