How portable is mmap?

I was thinking about using mmapfiles to read, and I was wondering how portable this is. I am developing on the Linux platform, but would like my program to work on Mac OS X and Windows.

Can I assume that it mmapworks on these platforms?

+8
source share
4 answers

The function mmap()is a POSIX call. It works fine on MacOS X (both on Linux, and on HP-UX, and on AIX, and on Solaris).

Windows. , _mmap() POSIX. , , , Microsoft mmap() , POSIX. Windows MapViewOfFile() SO (mmap() ).

32- , , , . , ; , , .

+12

mmap , . 32- - , 1G - , mmap 1G.

+3

, mmap() Windows ( , MapViewOfFile() ). c python mmap c, , .

+2

UNIX , SIGSEGV/SIGBUS ( , ). "" setjmp/longjmp , SIGSEGV/SIGBUS. g++ , OS, , g++ g++ . , , , , 20 UNIX.

+2

All Articles