Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ab58405b authored by Jack He's avatar Jack He
Browse files

LruCache: Improve efficieny and ease of use of APIs

* Add a Find() function that returns the pointer to the value associated
  with a key, further changes to the value using that poitner does not
  warm up the cache
* Remove eviction callback, but instead return an optional evicted node
  when Put() evicts a cold node. This prevents potential deadlock when
  calling LruCache methods in the callback
* HasKey() is not zero-copy
* Get() calls Find()
* Add unit tests for these new features
* Modify MetricIdAllocator to use these new features

Bug: 143515989
Test: atest --host bluetooth_test_common
Change-Id: I9071c86a9041e5c95b349824889ccedf9f9c18dc
parent b196e223
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment