Fixing OOM crash in base::ProcessMetrics::GetWorkingSetKBytes
According to crash dump OOM happens when GetWorkingSetKBytes is invoked via OomMemoryDetails from tab discarding code when it reacts to critical memory pressure. The available memory is already low at that moment so allocating 1.4-1.5 MiB to gather Working Set details is likely to fail. The fix uses UncheckedMalloc to avoid triggering an OOM crash and allow GetWorkingSetKBytes to fail, which the code calling GetWorkingSetKBytes should already handle. Another part of the fix is to reduce the extra buffer size allocated by this code from 25% to 10%. BUG=642186 Review-Url: https://codereview.chromium.org/2289123003 Cr-Commit-Position: refs/heads/master@{#417479}
Showing
Please register or sign in to comment