Reputation: 2552
Is it normal for an application to have approximately 100 instances of local binders? The number climbs to that high, and never drops down to what it initially is. What could be the scenarios to have this large number of binders?
Upvotes: 0
Views: 2616
Reputation: 4114
(Rewritten as the author is asking about the number of local binders listed using adb shell dumpsys meminfo
). I can't answer the question about whether this is normal, as I'd never spotted that command before!
But here is a bit of information about the scenarios which could cause it.
A local binder is any object which the Android 'Binder' kernel IPC driver believes can receive function calls from another process.
Such things could include:
IBinder
. There are always such objects when you're declaring an Android service. Very often you'll also create such objects (as listeners) when you're using someone else's service.IBinder
-derived objects within the Android framework. In some cases this might be obvious, such as when you provide some sort of listener to some system service. But other Android framework classes often have Binders involved too. For example, I have a feeling that an Android Bitmap contains an IBinder
somewhere within it, in order to arrange for different processes to share the bitmap data without needing to copy it. I'm not sure about that, though.ISurfaceComposer
.So, to work out why you have so many Binders, think about these things:
Service
s and AIDL?My gut feeling is that 100 is unusual; probably nothing actually to worry about, but I'd still be curious to know if you work out what the cause was.
Upvotes: 2