diff options
| author | 2022-11-22 12:14:35 -0800 | |
|---|---|---|
| committer | 2022-11-28 23:20:52 +0000 | |
| commit | 34a703b4c56bf40024550f18a34bf34ce843ad54 (patch) | |
| tree | 1a833b273dc5798f7c7b457e087581f0e6ea4f99 /services/coverage/java | |
| parent | c20814583e7221a094ebbd3248e0c5d13e0eaf34 (diff) | |
Manually manage memory of native objects
Even though these surfaces/transactions are unreachable, it still
takes time for the GC/NativeRegistry/FinalizerQueue to actually
flush/free references (even if you force GC, it won't flush the
NativeRegistry/FinalizerQueue). This skews the results of our
memory benchmark tests since they measure instantaneous memory.
So, add logic to manually release Transactions/SurfaceControls
when we know they won't be used. This is extra tricky due to
unparceling creating new refcounts. To resolve this, we assume
that all remotes are getting a COPY of all surfaces and then we
make deep-ish copies on the CALLER side if the binder is actually
local. We can't alter the logic on the receiver side because the
binders are one-way and thus PID information isn't available.
Bug: 258913831
Test: systemui-notification-memory-suite-demo and check aggregates
Change-Id: If094e7eeb248a8674e8094cf5cf3019b2cd58047
Diffstat (limited to 'services/coverage/java')
0 files changed, 0 insertions, 0 deletions