diff options
| author | 2023-03-01 10:27:59 +0800 | |
|---|---|---|
| committer | 2023-03-03 11:41:33 -0800 | |
| commit | 13a5b557909fabc78d132cd249c3baf502e878fb (patch) | |
| tree | f5e8a1ec5701f7e59131f479771b5fdfafcd6a3d /libs/androidfw/StringPool.cpp | |
| parent | 09262ed09d8686e8b929b752942ba6a86d5dfc6f (diff) | |
Reduce the memory usage of the ProtoLogToFile
The protolog in wm/am is generally less than 1kb after being writtem to ProtoOutputStream,
but 'new ProtoOutputStream()' will at least create a byte array of 8kb each time.
This will cause each log to occupy at least 7kb of useless memory.
When the log cached by 'ProtoLogToFile' reaches BUFFER_CAPACITY(1MB), it will occupy 70MB of memory.
This has a greater impact on some low-memory devices.
Bug: 271179026
Bug: 262244460
Merged-In: I368278df6f801b2b2b67974089d4a7f4147d91cc
Change-Id: I368278df6f801b2b2b67974089d4a7f4147d91cc
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions