|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79513 - trunk/libs/interprocess/test
From: igaztanaga_at_[hidden]
Date: 2012-07-14 17:50:38
Author: igaztanaga
Date: 2012-07-14 17:50:37 EDT (Sat, 14 Jul 2012)
New Revision: 79513
URL: http://svn.boost.org/trac/boost/changeset/79513
Log:
Mapped region synchronous flush & size optimization
Text files modified:
trunk/libs/interprocess/test/file_mapping_test.cpp | 7 +++++++
trunk/libs/interprocess/test/shared_memory_mapping_test.cpp | 6 +++++-
trunk/libs/interprocess/test/windows_shared_memory_mapping_test.cpp | 8 ++++++++
3 files changed, 20 insertions(+), 1 deletions(-)
Modified: trunk/libs/interprocess/test/file_mapping_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/file_mapping_test.cpp (original)
+++ trunk/libs/interprocess/test/file_mapping_test.cpp 2012-07-14 17:50:37 EDT (Sat, 14 Jul 2012)
@@ -76,6 +76,13 @@
;++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
Modified: trunk/libs/interprocess/test/shared_memory_mapping_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/shared_memory_mapping_test.cpp (original)
+++ trunk/libs/interprocess/test/shared_memory_mapping_test.cpp 2012-07-14 17:50:37 EDT (Sat, 14 Jul 2012)
@@ -73,7 +73,11 @@
;++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;
}
}
Modified: trunk/libs/interprocess/test/windows_shared_memory_mapping_test.cpp
==============================================================================
--- trunk/libs/interprocess/test/windows_shared_memory_mapping_test.cpp (original)
+++ trunk/libs/interprocess/test/windows_shared_memory_mapping_test.cpp 2012-07-14 17:50:37 EDT (Sat, 14 Jul 2012)
@@ -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 @@
;++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
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk