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:
Diffstat (limited to 'example')
-rw-r--r--example/use_cases.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/example/use_cases.cpp b/example/use_cases.cpp
index 9237f5e1..160bcc9f 100644
--- a/example/use_cases.cpp
+++ b/example/use_cases.cpp
@@ -213,6 +213,9 @@ void malloc1()
// to a page, it will be page faulted into a private page by the kernel.
llfio::byte *p = mh.address();
size_t len = mh.length();
+ // map_handle::address() returns indeterminate bytes, so you need to bless
+ // them into existence before use
+ llfio::bless(p, len);
memset(p, 'a', len);
// Tell the kernel to throw away the contents of any whole pages