• cylee's avatar
    TabManager: Take min_free_kbytes into consideration when killing tabs. · 38d3bfaf
    cylee authored
    On ChromeOS, kernel notifies Chrome when system gets into low memory
    condition. However the low memory calculation misses a parameter
    |min_free_kbytes| so the notification comes too late. A kernel fix is
    coming to fix the issue.
    
    On Chrome side, TabManager tries to recover memory to normal level. It
    mirrors the low memory calculation in kernel to know how many tabs to
    kill. So the missing parameter |min_free_kbytes| should be added back.
    
    In the future, try to consolidate the logic in kernel so TabManager
    doesn't need to do its own calculation.
    
    BUG=chromium:645512,chrome-os-partner:60498
    TEST=cave,peppy,etc.
    
    Review-Url: https://codereview.chromium.org/2618483002
    Cr-Commit-Position: refs/heads/master@{#442018}
    38d3bfaf
tab_manager_delegate_chromeos.cc 27.9 KB