diff options
Diffstat (limited to 'runtime/mem_map.cc')
-rw-r--r-- | runtime/mem_map.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/mem_map.cc b/runtime/mem_map.cc index 6c39361e24..12793e433e 100644 --- a/runtime/mem_map.cc +++ b/runtime/mem_map.cc @@ -952,6 +952,9 @@ void MemMap::TryReadable() { } void ZeroAndReleasePages(void* address, size_t length) { + if (length == 0) { + return; + } uint8_t* const mem_begin = reinterpret_cast<uint8_t*>(address); uint8_t* const mem_end = mem_begin + length; uint8_t* const page_begin = AlignUp(mem_begin, kPageSize); |