mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
[29/n] Internal 4GB allocator.
- Internal allocations may now coexists with non internal on reusable list. - Caller now specifies if internal allocation is needed. - If criteria are not met , then allocation is not returned. Change-Id: I7da3a4f944768b7c8a873e44fd47248f1d76bf9e
This commit is contained in:
@ -281,7 +281,7 @@ LinearStream &CommandQueue::getCS(size_t minRequiredSize) {
|
||||
|
||||
auto requiredSize = minRequiredSize + CSRequirements::csOverfetchSize;
|
||||
|
||||
GraphicsAllocation *allocation = memoryManager->obtainReusableAllocation(requiredSize).release();
|
||||
GraphicsAllocation *allocation = memoryManager->obtainReusableAllocation(requiredSize, false).release();
|
||||
|
||||
if (!allocation) {
|
||||
allocation = memoryManager->allocateGraphicsMemory(requiredSize, MemoryConstants::pageSize);
|
||||
@ -640,7 +640,7 @@ void CommandQueue::allocateHeapMemory(IndirectHeap::Type heapType,
|
||||
|
||||
finalHeapSize = alignUp(std::max(finalHeapSize, minRequiredSize), MemoryConstants::pageSize);
|
||||
|
||||
auto heapMemory = memoryManager->obtainReusableAllocation(finalHeapSize).release();
|
||||
auto heapMemory = memoryManager->obtainReusableAllocation(finalHeapSize, false).release();
|
||||
|
||||
if (!heapMemory) {
|
||||
heapMemory = memoryManager->allocateGraphicsMemory(finalHeapSize, MemoryConstants::pageSize);
|
||||
|
Reference in New Issue
Block a user