Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------doc/html8
-rw-r--r--include/boost/afio/revision.hpp6
-rw-r--r--include/boost/afio/v2.0/detail/impl/windows/map_handle.ipp8
-rw-r--r--include/boost/afio/v2.0/map_handle.hpp13
4 files changed, 19 insertions, 16 deletions
diff --git a/doc/html b/doc/html
-Subproject 1b7c5e0124f0c57418b5b26b451a7afc28b6025
+Subproject a8bd7fba82cb78daa1f01c003cba667dcf0164f
diff --git a/include/boost/afio/revision.hpp b/include/boost/afio/revision.hpp
index e36d2fa3..e0eaa1b0 100644
--- a/include/boost/afio/revision.hpp
+++ b/include/boost/afio/revision.hpp
@@ -1,4 +1,4 @@
// Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time
-#define BOOST_AFIO_PREVIOUS_COMMIT_REF b0638aa44b6aecc35351a12bd73838d521fb7f92
-#define BOOST_AFIO_PREVIOUS_COMMIT_DATE "2017-04-10 09:18:59 +00:00"
-#define BOOST_AFIO_PREVIOUS_COMMIT_UNIQUE b0638aa4
+#define BOOST_AFIO_PREVIOUS_COMMIT_REF f76e3d07c7e7ae6bf6504837af1bb3ba7a90a367
+#define BOOST_AFIO_PREVIOUS_COMMIT_DATE "2017-04-10 20:44:12 +00:00"
+#define BOOST_AFIO_PREVIOUS_COMMIT_UNIQUE f76e3d07
diff --git a/include/boost/afio/v2.0/detail/impl/windows/map_handle.ipp b/include/boost/afio/v2.0/detail/impl/windows/map_handle.ipp
index d34e4a89..75ec761f 100644
--- a/include/boost/afio/v2.0/detail/impl/windows/map_handle.ipp
+++ b/include/boost/afio/v2.0/detail/impl/windows/map_handle.ipp
@@ -255,9 +255,9 @@ result<map_handle::buffer_type> map_handle::commit(buffer_type region, section_h
if(_flag == section_handle::flag::none)
{
DWORD _ = 0;
- if(!VirtualProtect(_region.first, _region.second, PAGE_NOACCESS, &_))
+ if(!VirtualProtect(region.first, region.second, PAGE_NOACCESS, &_))
return make_errored_result<buffer_type>(GetLastError());
- return _region;
+ return region;
}
if(_flag & section_handle::flag::cow)
{
@@ -288,9 +288,9 @@ result<map_handle::buffer_type> map_handle::decommit(buffer_type region) noexcep
if(!region.first)
return make_errored_result<map_handle::buffer_type>(stl11::errc::invalid_argument);
region = utils::round_to_page_size(region);
- if(!VirtualFree(_region.first, _region.second, MEM_DECOMMIT))
+ if(!VirtualFree(region.first, region.second, MEM_DECOMMIT))
return make_errored_result<buffer_type>(GetLastError());
- return _region;
+ return region;
}
result<void> map_handle::zero(buffer_type region) noexcept
diff --git a/include/boost/afio/v2.0/map_handle.hpp b/include/boost/afio/v2.0/map_handle.hpp
index 1af93297..76124962 100644
--- a/include/boost/afio/v2.0/map_handle.hpp
+++ b/include/boost/afio/v2.0/map_handle.hpp
@@ -177,9 +177,6 @@ inline std::ostream &operator<<(std::ostream &s, const section_handle::flag &v)
\note The native handle returned by this map handle is always that of the backing storage, but closing this handle
does not close that of the backing storage, nor does releasing this handle release that of the backing storage.
Locking byte ranges of this handle is therefore equal to locking byte ranges in the original backing storage.
-
-\todo MADV_NOSYNC on FreeBSD needs to applied when the file is temporary
-\todo MADV_FREE on FreeBSD seems to do what MADV_DONTNEED does on Linux, investigate.
*/
class BOOST_AFIO_DECL map_handle : public io_handle
{
@@ -289,9 +286,15 @@ public:
//! Ask the system to begin to asynchronously prefetch the span of memory regions given, returning the regions actually prefetched. Note that on Windows 7 or earlier the system call to implement this was not available, and so you will see an empty span returned.
static result<span<buffer_type>> prefetch(span<buffer_type> regions) noexcept;
+ //! \overload
+ static result<buffer_type> prefetch(buffer_type region) noexcept { BOOST_OUTCOME_TRY(ret, prefetch(span<buffer_type>(&region, 1))); return *ret.data(); }
- //! Ask the system to unset the dirty flag for the memory represented by the buffer. This will prevent any changes not yet sent to the backing storage from being sent in the future, also if the system kicks out this page and reloads it you may see some edition of the underlying storage instead of what was here. addr
- //! and length should be page aligned (see utils::page_sizes()), if not the returned buffer is the region actually undirtied.
+ /*! Ask the system to unset the dirty flag for the memory represented by the buffer. This will prevent any changes not yet sent to the backing storage from being sent in the future, also if the system kicks out this page and reloads it you may see some edition of the underlying storage instead of what was here. addr
+ and length should be page aligned (see utils::page_sizes()), if not the returned buffer is the region actually undirtied.
+
+ \warning This function destroys the contents of unwritten pages in the region in a totally unpredictable fashion. Only use it if you don't care how much of
+ the region reaches physical storage or not. Note that the region is not necessarily zeroed, and may be randomly zeroed.
+ */
static result<buffer_type> do_not_store(buffer_type region) noexcept;
/*! \brief Read data from the mapped view.