libbinder: avoid attached objects for stability
Attached objects require a heap allocation, and stability is always
attached. This avoids a heap allocation per binder object (Android R
regression).
Bug: 148177595
Test: binderStabilityTest
Change-Id: I5eab8be5d87fdd9468bcbd8d54913ca713559314
diff --git a/libs/binder/BpBinder.cpp b/libs/binder/BpBinder.cpp
index f16c39c..d2b9b8f 100644
--- a/libs/binder/BpBinder.cpp
+++ b/libs/binder/BpBinder.cpp
@@ -138,6 +138,7 @@
BpBinder::BpBinder(int32_t handle, int32_t trackedUid)
: mHandle(handle)
+ , mStability(0)
, mAlive(1)
, mObitsSent(0)
, mObituaries(nullptr)