• Tiansong Cui's avatar
    [chromecast][BLE] Limit scan result to 1024 entries · fc66ae44
    Tiansong Cui authored
    Continuous Bluetooth scan may cause scan results to accumulate.
    This can result in large memory usage if there are other devices
    advertising with randomized MAC addresses.
    We limit the scan result cache to 1024 entries to prevent this situation.
    We kick out the least recently used entry when limit is reached.
    
    Bug: internal 116650055
    Test: cast_bluetooth_unittests, manual.
    Change-Id: Ife0161a6edbc4354133dc158d0901ddce6ef876a
    Reviewed-on: https://chromium-review.googlesource.com/1255630
    Commit-Queue: Tiansong Cui <tiansong@google.com>
    Reviewed-by: default avatarBailey Forrest <bcf@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#595692}
    fc66ae44
le_scan_manager_impl.h 2.67 KB