Home
last modified time | relevance | path

Searched refs:heap (Results 1 – 25 of 46) sorted by relevance

12

/frameworks/av/media/module/libmediatranscoding/tests/
DAdjustableMaxPriorityQueue_tests.cpp47 AdjustableMaxPriorityQueue<std::pair<float, char*>> heap; in TEST() local
57 heap.push(std::pair<float, char*>(value, nullptr)); in TEST()
64 for (it = heap.begin(); it != heap.end(); ++it) { in TEST()
70 EXPECT_EQ(10, heap.size()); in TEST()
75 while (!heap.empty()) { in TEST()
76 float value = heap.top().first; in TEST()
81 heap.pop(); in TEST()
113 AdjustableMaxPriorityQueue<std::unique_ptr<int>, IntUniquePtrComp> heap; in TEST() local
116 EXPECT_TRUE(heap.push(std::move(smaller))); in TEST()
117 EXPECT_EQ(1, *heap.top()); in TEST()
[all …]
/frameworks/native/libs/binder/
DIMemory.cpp59 sp<IMemoryHeap> heap; member
155 sp<IMemoryHeap> heap = getMemory(&offset); in unsecurePointer() local
156 void* const base = heap!=nullptr ? heap->base() : MAP_FAILED; in unsecurePointer()
194 sp<IBinder> heap = reply.readStrongBinder(); in getMemory() local
195 if (heap != nullptr) { in getMemory()
196 mHeap = interface_cast<IMemoryHeap>(heap); in getMemory()
292 sp<BpMemoryHeap> heap = sp<BpMemoryHeap>::cast(find_heap(binder)); in assertMapped() local
293 heap->assertReallyMapped(); in assertMapped()
294 if (heap->mBase != MAP_FAILED) { in assertMapped()
297 mBase = heap->mBase; in assertMapped()
[all …]
DMemoryBase.cpp28 MemoryBase::MemoryBase(const sp<IMemoryHeap>& heap, in MemoryBase() argument
30 : mSize(size), mOffset(offset), mHeap(heap) in MemoryBase()
DMemoryDealer.cpp114 const sp<IMemoryHeap>& heap, ssize_t offset, size_t size);
167 const sp<IMemoryHeap>& heap, ssize_t offset, size_t size) in Allocation() argument
168 : MemoryBase(heap, offset, size), mDealer(dealer) in Allocation()
171 void* const start_ptr = (void*)(intptr_t(heap->base()) + offset); in Allocation()
243 memory = sp<Allocation>::make(sp<MemoryDealer>::fromExisting(this), heap(), offset, size); in allocate()
258 const sp<IMemoryHeap>& MemoryDealer::heap() const { in heap() function in android::MemoryDealer
/frameworks/av/media/libshmem/
DShmemCompat.cpp54 const sp<MemoryHeapBase> heap = in convertSharedFileRegionToIMemory() local
56 *result = sp<MemoryBase>::make(heap, in convertSharedFileRegionToIMemory()
72 sp<IMemoryHeap> heap = mem->getMemory(&offset, &size); in convertIMemoryToSharedFileRegion() local
74 if (heap == nullptr) { in convertIMemoryToSharedFileRegion()
80 heap->getOffset() > std::numeric_limits<int64_t>::max() || in convertIMemoryToSharedFileRegion()
81 static_cast<uint64_t>(heap->getOffset()) + in convertIMemoryToSharedFileRegion()
87 const int fd = fcntl(heap->getHeapID(), F_DUPFD_CLOEXEC, 0); in convertIMemoryToSharedFileRegion()
93 result->offset = heap->getOffset() + offset; in convertIMemoryToSharedFileRegion()
94 result->writeable = (heap->getFlags() & IMemoryHeap::READ_ONLY) == 0; in convertIMemoryToSharedFileRegion()
DShmemTest.cpp50 sp<MemoryHeapBase> heap = new MemoryHeapBase(content.size(), in makeIMemory() local
52 sp<IMemory> result = sp<MemoryBase>::make(heap, kOffset, content.size()); in makeIMemory()
/frameworks/av/media/utils/include/mediautils/
DSharedMemoryAllocator.h63 constexpr inline bool isHeapValid(const sp<IMemoryHeap>& heap) {
64 return (heap && heap->getBase() &&
65 heap->getBase() != MAP_FAILED); // TODO if not mapped locally
336 const auto heap = handle->getMemory();
337 dump << std::setw(8) << heap->getHeapID() << std::setw(8) << heap->getSize()
338 << std::setw(8) << heap->getOffset() << std::setw(8) << value.allocation_number
458 auto heap =
460 if (!shared_allocator_impl::isHeapValid(heap)) {
463 return sp<MemoryBase>::make(heap, 0, heap->getSize());
469 const auto heap = allocation->getMemory();
[all …]
/frameworks/base/media/tests/audiotests/
Dshared_mem_test.cpp72 sp<MemoryDealer> heap; in Test01() local
91 heap = new MemoryDealer(1024*1024, "AudioTrack Heap Base"); in Test01()
93 iMem = heap->allocate(BUF_SZ*sizeof(short)); in Test01()
120 heap.clear(); in Test01()
/frameworks/native/include/binder/
DMemoryDealer.h44 sp<IMemoryHeap> getMemoryHeap() const { return heap(); } in getMemoryHeap()
52 const sp<IMemoryHeap>& heap() const;
DIMemory.h105 void* fastPointer(const sp<IBinder>& heap, ssize_t offset) const;
/frameworks/native/libs/binder/include/binder/
DMemoryDealer.h44 sp<IMemoryHeap> getMemoryHeap() const { return heap(); } in getMemoryHeap()
52 const sp<IMemoryHeap>& heap() const;
DMemoryBase.h32 MemoryBase(const sp<IMemoryHeap>& heap, ssize_t offset, size_t size);
DIMemory.h105 void* fastPointer(const sp<IBinder>& heap, ssize_t offset) const;
/frameworks/av/drm/libmediadrm/include/mediadrm/
DCryptoHalHidl.h69 virtual int32_t setHeap(const sp<HidlMemory>& heap) { in setHeap()
70 return setHeapBase(heap); in setHeap()
98 int32_t setHeapBase(const sp<HidlMemory>& heap);
DCryptoHal.h48 virtual int32_t setHeap(const sp<HidlMemory>& heap);
/frameworks/av/media/libaudioclient/tests/
Dtest_create_audiotrack.cpp71 sp<MemoryDealer> heap; in testTrack() local
90 heap = new MemoryDealer(heapSize, "AudioTrack Heap Base"); in testTrack()
91 sharedBuffer = heap->allocate(heapSize); in testTrack()
/frameworks/av/drm/libmediadrm/
DCryptoHal.cpp93 int32_t CryptoHal::setHeap(const sp<HidlMemory>& heap) { in setHeap() argument
95 if (mCryptoHalAidl->initCheck() == OK) return mCryptoHalAidl->setHeap(heap); in setHeap()
96 return mCryptoHalHidl->setHeap(heap); in setHeap()
DCryptoHalAidl.cpp368 int32_t CryptoHalAidl::setHeap(const sp<HidlMemory>& heap) { in setHeap() argument
369 if (heap == NULL || mHeapSeqNum < 0) { in setHeap()
370 ALOGE("setHeap(): heap %p mHeapSeqNum %d", heap.get(), mHeapSeqNum); in setHeap()
382 mHeapSizes.add(seqNum, heap->size()); in setHeap()
385 memAidl.handle = ::android::dupToAidl(heap->handle()); in setHeap()
386 memAidl.size = heap->size(); in setHeap()
DCryptoHalHidl.cpp217 int32_t CryptoHalHidl::setHeapBase(const sp<HidlMemory>& heap) { in setHeapBase() argument
218 if (heap == NULL || mHeapSeqNum < 0) { in setHeapBase()
219 ALOGE("setHeapBase(): heap %p mHeapSeqNum %d", heap.get(), mHeapSeqNum); in setHeapBase()
231 mHeapSizes.add(seqNum, heap->size()); in setHeapBase()
232 Return<void> hResult = mPlugin->setSharedBufferBase(*heap, bufferId); in setHeapBase()
/frameworks/base/media/jni/soundpool/
DSound.cpp50 audio_channel_mask_t *channelMask, const sp<MemoryHeapBase>& heap, in decode() argument
84 auto writePos = static_cast<uint8_t*>(heap->getBase()); in decode()
85 size_t available = heap->getSize(); in decode()
/frameworks/av/media/libmediaplayerservice/
DMetadataRetrieverClient.cpp284 sp<MemoryHeapBase> heap = new MemoryHeapBase(size, 0, "MetadataRetrieverClient"); in extractAlbumArt() local
285 if (heap == NULL) { in extractAlbumArt()
290 mAlbumArt = new MemoryBase(heap, 0, size); in extractAlbumArt()
/frameworks/av/media/libdatasource/
DAndroid.bp47 "libc_malloc_debug_backtrace", // for memory heap analysis
/frameworks/base/core/tests/coretests/src/android/os/
DCancellationSignalBeamerTest.java201 File heap = new File(mContext.getExternalFilesDir(null), "dump.hprof"); in waitForWithGc()
202 Debug.dumpHprofData(heap.getAbsolutePath()); in waitForWithGc()
/frameworks/av/drm/libmediadrm/fuzzer/
Dmediadrm_fuzzer.cpp381 sp<HidlMemory> heap = fromHeap(dealer->getMemoryHeap()); in invokeCryptoDecrypt() local
382 if (!heap) { in invokeCryptoDecrypt()
385 int heapSeqNum = mCrypto->setHeap(heap); in invokeCryptoDecrypt()
420 heap.clear(); in invokeCryptoDecrypt()
/frameworks/av/media/libstagefright/
DCameraSource.cpp806 sp<IMemoryHeap> heap = frame->getMemory(&offset, &size); in releaseRecordingFrame() local
807 if (heap->getHeapID() != mMemoryHeapBase->getHeapID()) { in releaseRecordingFrame()
809 heap->getHeapID(), mMemoryHeapBase->getHeapID()); in releaseRecordingFrame()
814 (uint8_t*)heap->getBase() + offset); in releaseRecordingFrame()
1056 sp<IMemoryHeap> heap = data->getMemory(&offset, &size); in processBufferQueueFrame() local
1058 (uint8_t*)heap->getBase() + offset); in processBufferQueueFrame()

12