OSDN Git Service

Free allocation tracker hash map entries to reduce memory pressure
authorSrinu Jella <sjella@codeaurora.org>
Fri, 6 Nov 2015 09:29:10 +0000 (14:59 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Mon, 14 Mar 2016 15:59:45 +0000 (08:59 -0700)
commit2bea757aba0d0d84865d7d0d675d8bcf31f90b22
tree75a6e0a32fafa78033087384be01845985160e7c
parentfecf606348a0751e0be30e376c9817195afe68ca
Free allocation tracker hash map entries to reduce memory pressure

Use case:
A2DP playback becomes choppy after long hours of testing.

Steps:
1. installed 3rd party app that performs recurring LE scans.
2. Leave phone to run overnight.
3. After 24h+, connect a Bluetooth headset and music is very choppy.

Root cause:
The memory allocation tracker has support for double free check
where it stores all allocations in hash map but it never get
removed to track double free issue, A2DP memory allocation is
taking more time and leading to choppyness.

Fix:
Free the hash map entry to avoid memory leak from
allocation tracker.

Bug: 27621407
Change-Id: If57bd0b89c1d9b99c4f066c537a9e0fa49bc093f
osi/src/allocation_tracker.c