Try reduce vma count on host to prevent panic because of too much mprotect

This commit is contained in:
Hui, Chunyang 2021-10-21 09:32:13 +00:00 committed by Zongmin.Gu
parent 4f23cca048
commit fa69b3d0d1

@ -783,6 +783,9 @@ impl InternalVMManager {
// Remove from chunks
self.chunks.remove(chunk);
// Mprotect the whole chunk to reduce the usage of vma count of host
VMPerms::apply_perms(range, VMPerms::DEFAULT);
// Add range back to freespace manager
self.free_manager.add_range_back_to_free_manager(range);
Ok(())