Mapped region synchronous flush & size optimization

[SVN r79513]
This commit is contained in:
Ion Gaztañaga
2012-07-14 21:50:37 +00:00
parent 09b468e1b6
commit eea3c18185
3 changed files with 20 additions and 1 deletions

View File

@@ -76,6 +76,13 @@ int main ()
;++i){
*filler++ = static_cast<unsigned char>(i);
}
if(!region.flush(0, 0, false)){
return 1;
}
if(!region2.flush(0, 0, true)){
return 1;
}
}
//See if the pattern is correct in the file

View File

@@ -73,7 +73,11 @@ int main ()
;++i){
*filler++ = static_cast<unsigned char>(i);
}
if(!region.flush()){
if(!region.flush(0, 0, false)){
return 1;
}
if(!region2.flush(0, 0, true)){
return 1;
}
}

View File

@@ -9,6 +9,7 @@
//////////////////////////////////////////////////////////////////////////////
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#ifdef BOOST_INTERPROCESS_WINDOWS
@@ -61,6 +62,13 @@ int main ()
;++i){
*filler++ = static_cast<unsigned char>(i);
}
if(!region.flush(0, 0, false)){
return 1;
}
if(!region2.flush(0, 0, true)){
return 1;
}
}
//See if the pattern is correct in the file using two mapped regions