Lines Matching refs:heap
238 * If the heap base isn't set, get the heap base from the IMemory
239 * and send it to the HAL so it can map a remote heap of the same
240 * size. Once the heap base is established, shared memory buffers
241 * are sent by providing an offset into the heap and a buffer size.
243 int32_t CryptoHal::setHeapBase(const sp<IMemoryHeap>& heap) {
247 if (heap == NULL) {
248 ALOGE("setHeapBase(): heap is NULL");
255 sp<HidlMemory> hidlMemory = fromHeap(heap);
256 mHeapBases.add(seqNum, HeapBase(mNextBufferId, heap->getSize()));
291 sp<IMemoryHeap> heap = memory->getMemory(&offset, &size);
292 if (heap == NULL) {
301 // heap must be the same size as the one that was set in setHeapBase
302 if (mHeapBases.valueFor(seqNum).getSize() != heap->getSize()) {
307 // memory must be within the address space of the heap
308 if (memory->pointer() != static_cast<uint8_t *>(heap->getBase()) + memory->offset() ||
309 heap->getSize() < memory->offset() + memory->size() ||