Lines Matching refs:binder

28 #include <binder/IMemory.h>
32 #include <binder/Parcel.h>
48 sp<IMemoryHeap> find_heap(const sp<IBinder>& binder);
49 void free_heap(const sp<IBinder>& binder);
50 sp<IMemoryHeap> get_heap(const sp<IBinder>& binder);
60 void free_heap(const wp<IBinder>& binder);
90 static inline sp<IMemoryHeap> find_heap(const sp<IBinder>& binder) {
91 return gHeapCache->find_heap(binder);
93 static inline void free_heap(const sp<IBinder>& binder) {
94 gHeapCache->free_heap(binder);
96 static inline sp<IMemoryHeap> get_heap(const sp<IBinder>& binder) {
97 return gHeapCache->get_heap(binder);
135 void* IMemory::fastPointer(const sp<IBinder>& binder, ssize_t offset) const
137 sp<IMemoryHeap> realHeap = BpMemoryHeap::get_heap(binder);
242 sp<IBinder> binder = const_cast<BpMemoryHeap*>(this)->asBinder();
245 LOGD("UNMAPPING binder=%p, heap=%p, size=%d, fd=%d",
246 binder.get(), this, mSize, mHeapId);
256 sp<IBinder> binder = const_cast<BpMemoryHeap*>(this)->asBinder();
257 free_heap(binder);
265 sp<IBinder> binder(const_cast<BpMemoryHeap*>(this)->asBinder());
266 sp<BpMemoryHeap> heap(static_cast<BpMemoryHeap*>(find_heap(binder).get()));
277 free_heap(binder);
297 LOGE_IF(err, "binder=%p transaction failed fd=%d, size=%ld, err=%d (%s)",
314 LOGE("cannot map BpMemoryHeap (binder=%p), size=%ld, fd=%d (%s)",
383 void HeapCache::binderDied(const wp<IBinder>& binder)
385 //LOGD("binderDied binder=%p", binder.unsafe_get());
386 free_heap(binder);
389 sp<IMemoryHeap> HeapCache::find_heap(const sp<IBinder>& binder)
392 ssize_t i = mHeapCache.indexOfKey(binder);
396 "found binder=%p, heap=%p, size=%d, fd=%d, count=%d",
397 binder.get(), info.heap.get(),
405 info.heap = interface_cast<IMemoryHeap>(binder);
407 //LOGD("adding binder=%p, heap=%p, count=%d",
408 // binder.get(), info.heap.get(), info.count);
409 mHeapCache.add(binder, info);
414 void HeapCache::free_heap(const sp<IBinder>& binder) {
415 free_heap( wp<IBinder>(binder) );
418 void HeapCache::free_heap(const wp<IBinder>& binder)
423 ssize_t i = mHeapCache.indexOfKey(binder);
429 "removing binder=%p, heap=%p, size=%d, fd=%d, count=%d",
430 binder.unsafe_get(), info.heap.get(),
438 LOGE("free_heap binder=%p not found!!!", binder.unsafe_get());
443 sp<IMemoryHeap> HeapCache::get_heap(const sp<IBinder>& binder)
447 ssize_t i = mHeapCache.indexOfKey(binder);
449 else realHeap = interface_cast<IMemoryHeap>(binder);