-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,239
  • 5
  • 58
  • 112
Invictus
  • 2,475
  • 6
  • 29
  • 48

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
  • 350,152
  • 45
  • 431
  • 590
3

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

Fred Foo
  • 342,876
  • 71
  • 713
  • 819