remove kernelHeader from HeapInfo

Change-Id: Ic2d441df15a7f75b5f3ef41d484969148e59715f
This commit is contained in:
chmielew
2020-05-26 09:36:04 +02:00
committed by Chmielewski, Krystian
parent 515b3787f5
commit 3e8f05d702
49 changed files with 122 additions and 261 deletions

View File

@@ -108,11 +108,9 @@ TEST(KernelInfoTest, givenKernelInfoWhenCreateKernelAllocationThenCopyWholeKerne
KernelInfo kernelInfo;
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
OsAgnosticMemoryManager memoryManager(executionEnvironment);
SKernelBinaryHeaderCommon kernelHeader;
const size_t heapSize = 0x40;
char heap[heapSize];
kernelHeader.KernelHeapSize = heapSize;
kernelInfo.heapInfo.pKernelHeader = &kernelHeader;
kernelInfo.heapInfo.KernelHeapSize = heapSize;
kernelInfo.heapInfo.pKernelHeap = &heap;
for (size_t i = 0; i < heapSize; i++) {
@@ -137,8 +135,6 @@ TEST(KernelInfoTest, givenKernelInfoWhenCreateKernelAllocationAndCannotAllocateM
KernelInfo kernelInfo;
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
MyMemoryManager memoryManager(executionEnvironment);
SKernelBinaryHeaderCommon kernelHeader;
kernelInfo.heapInfo.pKernelHeader = &kernelHeader;
auto retVal = kernelInfo.createKernelAllocation(0, &memoryManager);
EXPECT_FALSE(retVal);
}
@@ -233,11 +229,9 @@ using KernelInfoMultiRootDeviceTests = MultiRootDeviceFixture;
TEST_F(KernelInfoMultiRootDeviceTests, kernelAllocationHasCorrectRootDeviceIndex) {
KernelInfo kernelInfo;
SKernelBinaryHeaderCommon kernelHeader;
const size_t heapSize = 0x40;
char heap[heapSize];
kernelHeader.KernelHeapSize = heapSize;
kernelInfo.heapInfo.pKernelHeader = &kernelHeader;
kernelInfo.heapInfo.KernelHeapSize = heapSize;
kernelInfo.heapInfo.pKernelHeap = &heap;
auto retVal = kernelInfo.createKernelAllocation(expectedRootDeviceIndex, mockMemoryManager);