diff options
author | Muhammad Qureshi <muhammadq@google.com> | 2019-12-04 15:38:20 -0800 |
---|---|---|
committer | Muhammad Qureshi <muhammadq@google.com> | 2020-01-08 17:04:27 -0800 |
commit | 2a4c0782b5b61c8f558768fe82a486e5cd275234 (patch) | |
tree | c15acb2e7759f1aff461c2dc8b000735076af596 /tools/stats_log_api_gen/main.cpp | |
parent | 80e3e7a435c9f031e6a8d2032122fb4e1a17f199 (diff) |
Fix StatsEvent memory usage for pulled events
Add usePooledBuffer flag to the Builder which determines whether to reuse
the Buffer's byte array in StatsEvent or use a copy.
The build() function also calls release() on the Buffer
if a copy of the Buffer's byte array is passed to StatsEvent.
Also, for pushed events, release the StatsEvent object and consequently,
the Buffer in StatsLog.write(StatsEvent)
Fixes: 145026572
Fixes: 144126444
Test: bit FrameworksCoreTests:android.util.StatsEventTest
Change-Id: I1cdaf0027b69281cb7cb6f3c8ca923d03829b4dd
Merged-In: I1cdaf0027b69281cb7cb6f3c8ca923d03829b4dd
Diffstat (limited to 'tools/stats_log_api_gen/main.cpp')
0 files changed, 0 insertions, 0 deletions