mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 20:13:04 +08:00
Add support for reduced GPU address space
Change-Id: I9ebbc8c51039bb533b44c6b80e717e1489a20a43 Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
This commit is contained in:
@@ -1307,6 +1307,17 @@ TEST(OsAgnosticMemoryManager, givenDefaultOsAgnosticMemoryManagerWhenItIsQueried
|
||||
EXPECT_EQ(heapBase, memoryManager.getInternalHeapBaseAddress());
|
||||
}
|
||||
|
||||
TEST(OsAgnosticMemoryManager, givenOsAgnosticMemoryManagerWhenAllocateGraphicsMemoryForNonSvmHostPtrIsCalledThenAllocationIsCreated) {
|
||||
OsAgnosticMemoryManager memoryManager;
|
||||
auto hostPtr = reinterpret_cast<void *>(0x5001);
|
||||
auto allocation = memoryManager.allocateGraphicsMemoryForNonSvmHostPtr(13, hostPtr);
|
||||
EXPECT_NE(nullptr, allocation);
|
||||
EXPECT_EQ(13u, allocation->getUnderlyingBufferSize());
|
||||
EXPECT_EQ(1u, allocation->allocationOffset);
|
||||
|
||||
memoryManager.freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST_F(MemoryAllocatorTest, GivenSizeWhenGmmIsCreatedThenSuccess) {
|
||||
Gmm *gmm = new Gmm(nullptr, 65536, false);
|
||||
EXPECT_NE(nullptr, gmm);
|
||||
|
||||
Reference in New Issue
Block a user