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:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2018-10-17 21:23:18 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2018-10-17 21:23:18 +0300
commitfd12a60d26c80d93185ff0e0da1efa4ddbbf3863 (patch)
treecd4f6676380acf8f5d394494e6b1def7e243e8a8 /include/llfio/v2.0/map_handle.hpp
parentbc1a0df70b896bc5b1852e8281aced96596b27af (diff)
Lots of changes to support latest WG21 SG14 status code, as the erased code is now move-only, which in turn requires the async i/o completion handlers to all use rvalue refs instead of lvalue refs. This helped find and fix a fair few inefficient corner cases along the way, which is great.
Diffstat (limited to 'include/llfio/v2.0/map_handle.hpp')
-rw-r--r--include/llfio/v2.0/map_handle.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llfio/v2.0/map_handle.hpp b/include/llfio/v2.0/map_handle.hpp
index 56c5c74e..41b70ead 100644
--- a/include/llfio/v2.0/map_handle.hpp
+++ b/include/llfio/v2.0/map_handle.hpp
@@ -553,11 +553,14 @@ public:
//! Ask the system to make the memory represented by the buffer unavailable and to decommit the system resources representing them. addr and length should be page aligned (see `page_size()`), if not the returned buffer is the region actually decommitted.
LLFIO_HEADERS_ONLY_MEMFUNC_SPEC result<buffer_type> decommit(buffer_type region) noexcept;
- /*! Zero the memory represented by the buffer. Differs from zero() because it acts on mapped memory, but may call zero() internally.
+ /*! Zero the memory represented by the buffer. Differs from zero() because it acts on mapped memory, not on allocated file extents.
- On Linux, Windows and FreeBSD any full 4Kb pages will be deallocated from the
+ On Linux, Mac OS and FreeBSD any full 4Kb pages will be deallocated from the
system entirely, including the extents for them in any backing storage. On newer Linux kernels the kernel can additionally swap whole 4Kb pages for
freshly zeroed ones making this a very efficient way of zeroing large ranges of memory.
+
+ On Windows, this call currently only works for non-backed memory due to lacking kernel support.
+
\errors Any of the errors returnable by madvise() or DiscardVirtualMemory or the zero() function.
*/
LLFIO_HEADERS_ONLY_MEMFUNC_SPEC result<void> zero_memory(buffer_type region) noexcept;