OSDN Git Service

GD-Shim: Free BT_HDR after use or callback failure
authorJack He <siyuanh@google.com>
Fri, 23 Apr 2021 07:20:38 +0000 (00:20 -0700)
committerJack He <siyuanh@google.com>
Fri, 23 Apr 2021 07:41:03 +0000 (00:41 -0700)
commit8c6d960f52db509f2eb69f6b2cfd6d15577b36c8
tree7d1d5b03991cd5b20680ada19bac2ea88731aee7
parent03ad3c4dfa49a0cd52810ba79266db1119276f5a
GD-Shim: Free BT_HDR after use or callback failure

* Legacy stack always assume the last user of BT_HDR
  will free the structure. Make sure we do this in GD
  shim as well

Bug: 185083624
Tag: #gd-refactor
Test: gd/cert/run

Send a 31MB video
- before this change, RSS increased by 86 MB when 10% (3MB) was sent
- after this change, RSS increased by 37 MB and stabilized, this
  increase is anticipated as the file needs to be cached in RAM

BYPASS_LONG_LINES_REASON: consist with gd format

Change-Id: Ie934e6d4edd7dfc79b4444ce1c13819834f59692
bta/test/common/mock_main_shim_acl.cc
main/shim/acl.cc
main/shim/acl_api.cc
main/shim/acl_api.h
main/shim/btm_api.cc
main/shim/l2c_api.cc
stack/acl/btm_acl.cc
stack/test/common/mock_main_shim_acl_api.cc