[英]Is there any memory virtual file API in Windows?
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?
我想加快速度,Windows中是否有任何技术可以为模块创建虚拟内存文件?
Many thanks 非常感谢
I tested BoxedApp SDK . 我测试了BoxedApp SDK 。
It is awesome, but it is not free :) 它很棒,但是不是免费的:)
我不完全知道你是问什么的,但如果你只是想创建一个将生活在RAM(如果可能)的临时文件,可以使用CreateFile
与FILE_ATTRIBUTE_TEMPORARY
。
Assuming you're talking about memory mapped file, yes there are APIs for that. 假设您在谈论内存映射文件,是的,有相应的API。 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.
在一个SO的小答案中讨论太多了,而且距我使用已经有很多年了,所以我什至不记得函数名。 Here's how I found info on that quickly: http://www.google.com/search?q=memory+mapped+file+windows .
这是我快速找到有关信息的方法: 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., 干杯,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.