Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kernel/Memory: Fix overcommit when cloning anonymous mmap objects
AnonymousVMObject::try_clone() computed how many shared cow pages to commit by counting all VMObject pages that were not shared_zero_pages. This means that lazy_committed_pages were also being included in the count. This is a problem because the page fault handling code for lazy_committed_pages does not allocate from m_shared_committed_cow_pages. So more pages than necessary were being committed. This fixes this overcommitting problem by skipping lazy_committed_pages when counting how many pages to commit.
- Loading branch information