mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Fix problem in test.
- when pointer overlaps 2 pages then fragment count will be 2 not 1. - Limit the size to 1 byte to ensure only 1 page. Change-Id: I21c1e07037a99ff3e48909605cb4e2444e499d60
This commit is contained in:

committed by
sys_ocldev

parent
8604128d3c
commit
ebc16baa00
@ -254,8 +254,8 @@ TEST(MemoryManagerTest, givenForced32BitAndEnabled64kbPagesWhenGraphicsMemoryMus
|
||||
TEST(MemoryManagerTest, givenEnabled64kbPagesWhenGraphicsMemoryIsAllocatedWithHostPtrForBufferThenExistingMemoryIsUsedForAllocation) {
|
||||
OsAgnosticMemoryManager memoryManager(true);
|
||||
AllocationData allocData;
|
||||
char memory[10];
|
||||
MockOsAgnosticMemoryManager::getAllocationData(allocData, true, false, false, false, &memory, 10, GraphicsAllocation::AllocationType::BUFFER);
|
||||
char memory[1];
|
||||
MockOsAgnosticMemoryManager::getAllocationData(allocData, true, false, false, false, &memory, 1, GraphicsAllocation::AllocationType::BUFFER);
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemory(allocData);
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
|
Reference in New Issue
Block a user