Update README.md and example.cpp

This commit is contained in:
mandreyel 2018-10-22 15:24:30 +02:00
parent 50bfe8087a
commit 6570541b25
2 changed files with 4 additions and 4 deletions

View File

@ -113,8 +113,8 @@ int main()
const int answer_index = rw_mmap.size() / 2; const int answer_index = rw_mmap.size() / 2;
rw_mmap[answer_index] = 42; rw_mmap[answer_index] = 42;
// Don't forget to flush changes to disk, which is NOT done by the destructor for // We can explicitly flush changes to disk, but this is already done by the
// more explicit control of this potentially expensive operation. // destructor.
rw_mmap.sync(error); rw_mmap.sync(error);
if (error) { return handle_error(error); } if (error) { return handle_error(error); }

View File

@ -49,8 +49,8 @@ int main()
const int answer_index = rw_mmap.size() / 2; const int answer_index = rw_mmap.size() / 2;
rw_mmap[answer_index] = 42; rw_mmap[answer_index] = 42;
// Don't forget to flush changes to disk, which is NOT done by the destructor for // We can explicitly flush changes to disk, but this is already done by the
// more explicit control of this potentially expensive operation. // destructor.
rw_mmap.sync(error); rw_mmap.sync(error);
if (error) { return handle_error(error); } if (error) { return handle_error(error); }