[chromecast][BLE] Limit scan result to 1024 entries
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:Bailey Forrest <bcf@chromium.org> Cr-Commit-Position: refs/heads/master@{#595692}
Showing
Please register or sign in to comment