Lines Matching refs:alloc
160 auto buf = block.subAlloc->alloc(create.size); in newAllocation()
179 auto buf = newBlock.subAlloc->alloc(create.size); in newAllocation()
202 void deleteAllocation(const Allocation& alloc, std::vector<Block>& existingBlocks) { in deleteAllocation() argument
203 if (!alloc.buffer) return; in deleteAllocation()
207 if (existingBlocks.size() <= alloc.blockIndex) { in deleteAllocation()
210 "but it is not found", alloc.blockIndex); in deleteAllocation()
213 auto& block = existingBlocks[alloc.blockIndex]; in deleteAllocation()
220 if (!block.subAlloc->free(alloc.buffer)) { in deleteAllocation()
223 alloc.buffer, in deleteAllocation()
238 void freeRingStorage(const Allocation& alloc) { in freeRingStorage() argument
239 if (alloc.isView) return; in freeRingStorage()
240 deleteAllocation(alloc, mRingBlocks); in freeRingStorage()
249 void freeBuffer(const Allocation& alloc) { in freeBuffer() argument
250 if (alloc.isView) return; in freeBuffer()
251 deleteAllocation(alloc, mBufferBlocks); in freeBuffer()
274 Allocation allocRingViewIntoCombined(const Allocation& alloc) { in allocRingViewIntoCombined() argument
275 Allocation res = alloc; in allocRingViewIntoCombined()
276 res.buffer = alloc.buffer; in allocRingViewIntoCombined()
282 Allocation allocBufferViewIntoCombined(const Allocation& alloc) { in allocBufferViewIntoCombined() argument
283 Allocation res = alloc; in allocBufferViewIntoCombined()
284 res.buffer = alloc.buffer + sizeof(asg_ring_storage); in allocBufferViewIntoCombined()
290 void freeRingAndBuffer(const Allocation& alloc) { in freeRingAndBuffer() argument
291 deleteAllocation(alloc, mCombinedBlocks); in freeRingAndBuffer()
350 void fillAllocFromLoad(Allocation& alloc, AddressSpaceGraphicsContext::AllocType allocType) { in fillAllocFromLoad() argument
353 if (mRingBlocks.size() <= alloc.blockIndex) return; in fillAllocFromLoad()
354 fillAllocFromLoad(mRingBlocks[alloc.blockIndex], alloc); in fillAllocFromLoad()
357 if (mBufferBlocks.size() <= alloc.blockIndex) return; in fillAllocFromLoad()
358 fillAllocFromLoad(mBufferBlocks[alloc.blockIndex], alloc); in fillAllocFromLoad()
361 if (mCombinedBlocks.size() <= alloc.blockIndex) return; in fillAllocFromLoad()
362 fillAllocFromLoad(mCombinedBlocks[alloc.blockIndex], alloc); in fillAllocFromLoad()
459 void fillAllocFromLoad(const Block& block, Allocation& alloc) { in fillAllocFromLoad() argument
460 alloc.buffer = block.buffer + (alloc.offsetIntoPhys - block.offsetIntoPhys); in fillAllocFromLoad()
461 alloc.dedicatedContextHandle = block.dedicatedContextHandle; in fillAllocFromLoad()
462 alloc.hostmemId = block.hostmemId; in fillAllocFromLoad()
887 void AddressSpaceGraphicsContext::saveAllocation(base::Stream* stream, const Allocation& alloc) con… in saveAllocation()
888 stream->putBe64(alloc.blockIndex); in saveAllocation()
889 stream->putBe64(alloc.offsetIntoPhys); in saveAllocation()
890 stream->putBe64(alloc.size); in saveAllocation()
891 stream->putBe32(alloc.isView); in saveAllocation()
904 void AddressSpaceGraphicsContext::loadAllocation(base::Stream* stream, Allocation& alloc) { in loadAllocation() argument
905 alloc.blockIndex = stream->getBe64(); in loadAllocation()
906 alloc.offsetIntoPhys = stream->getBe64(); in loadAllocation()
907 alloc.size = stream->getBe64(); in loadAllocation()
908 alloc.isView = stream->getBe32(); in loadAllocation()