Dont overallocate Tag nodes

Change-Id: Ia92ed66dbe8d5c0577c612c7e6229e4c12d1426a
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-11-27 14:53:13 +01:00
committed by sys_ocldev
parent d74edb3d3f
commit 1dcc059826
2 changed files with 78 additions and 56 deletions

View File

@@ -142,11 +142,10 @@ class TagAllocator {
uintptr_t Size = graphicsAllocation->getUnderlyingBufferSize();
uintptr_t Start = reinterpret_cast<uintptr_t>(graphicsAllocation->getUnderlyingBuffer());
uintptr_t End = Start + Size;
size_t nodeCount = Size / tagSize;
NodeType *nodesMemory = new NodeType[nodeCount];
NodeType *nodesMemory = new NodeType[tagCount];
for (size_t i = 0; i < nodeCount; ++i) {
for (size_t i = 0; i < tagCount; ++i) {
nodesMemory[i].allocator = this;
nodesMemory[i].gfxAllocation = graphicsAllocation;
nodesMemory[i].tagForCpuAccess = reinterpret_cast<TagType *>(Start);