diff options
Diffstat (limited to 'include/llfio/v2.0/detail/impl/posix/map_handle.ipp')
-rw-r--r-- | include/llfio/v2.0/detail/impl/posix/map_handle.ipp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llfio/v2.0/detail/impl/posix/map_handle.ipp b/include/llfio/v2.0/detail/impl/posix/map_handle.ipp index bf676d4a..397576a8 100644 --- a/include/llfio/v2.0/detail/impl/posix/map_handle.ipp +++ b/include/llfio/v2.0/detail/impl/posix/map_handle.ipp @@ -534,7 +534,7 @@ result<map_handle::buffer_type> map_handle::commit(buffer_type region, section_h size_type bytes = region.size(); OUTCOME_TRYV(do_mmap(_v, region.data(), MAP_FIXED, _section, _pagesize, bytes, offset, flag)); // Tell the kernel we will be using these pages soon - if(-1 == ::madvise(region.data(), region.size(), MADV_WILLNEED)) + if(_section != nullptr && -1 == ::madvise(region.data(), region.size(), MADV_WILLNEED)) { return posix_error(); } |