diff options
Diffstat (limited to 'runtime/mem_map.cc')
| -rw-r--r-- | runtime/mem_map.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/mem_map.cc b/runtime/mem_map.cc index 3571edb277..18c52e47b6 100644 --- a/runtime/mem_map.cc +++ b/runtime/mem_map.cc @@ -583,6 +583,10 @@ void MemMap::MadviseDontNeedAndZero() { } } +bool MemMap::Sync() { + return msync(BaseBegin(), BaseSize(), MS_SYNC) == 0; +} + bool MemMap::Protect(int prot) { if (base_begin_ == nullptr && base_size_ == 0) { prot_ = prot; |