mmapping with MAP_PRIVATE

erkki.s@sci.fi
Sun, 18 May 1997 15:11:26 +0300 (EET DST)


Is it true that if I mmap a file with MAP_PRIVATE (so that the file is
copied to memory when you attempt to write to the mmapped area), you have
to physically/virtuall have a memory block large enough to contain the
mmapped area? I noticed that I could mmap 100 megabytes of a while when I
used MAP_SHARED, but couldn't if I used MAP_PRIVATE. Smaller sizes worked
great with MAP_PRIVATE too.

I think this should be fixed, as it would make programming databases much
easier ;). And it is a bug, right?

'''' '' '' '' '' '' |Erkki Seppälä, erkki.s@sci.fi | ____ |
,, ,, ,, ,, ,,, | --> http://www.sci.fi/~tes/flux/| \\ ` Sigma |
'' '' '' '' '' | | \> |
,,,, ,, ,, ,, ,, |flux/Inside Informatics ry | _/__, project |
'''' '' '' '' ''' | --> http://inside.edu.lahti.fi/ | ~~~~ |
,, ,,, ,,, ,, ,, |_________________________________|_______________|