-2

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 programming in C++.

wilx
  • 17,697
  • 6
  • 59
  • 114
Invictus
  • 2,653
  • 8
  • 31
  • 50

2 Answers2

6

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:

Community
  • 1
  • 1
sehe
  • 374,641
  • 47
  • 450
  • 633
3

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

Fred Foo
  • 355,277
  • 75
  • 744
  • 836