开发者

Does FreeBSD support memory mapped files?

I am using a FreeBSD OS, I want to write into a file which is on the disk, but, it will take a lot of time, so, I was suggested to use Memory mapped file. But, I am in a dilemma whether FreeBSD supports it or no???.. Please, somebody can guide me??.. I am开发者_Python百科 programming in C++.


Any UNIX (Posix compliant OS) has mmap, so yes FreeBSD has it.

STL does not exist as such. (see e.g. What's the difference between "STL" and "C++ Standard Library"?)

You mean:

Does the C++ standard library 'have' it?

No, the C++ standard library does not directly provide/wrap support for mmap. However, you can have a look here:

  • mmap() vs. reading blocks
  • Boost::Iostreams already has a mapped_file: boost::iostreams::mapped_file


Yes, FreeBSD has memory mapped files. No, the STL does not include any special support for them. Consider using Boost.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜