[13/n] Internal 4GB allocator.

- Add common function for all memory managers to obtain internal heap base.

Change-Id: Iacdaaf598e8786dad046b3f4550f9c80ce3f15d9
This commit is contained in:
Mrozek, Michal
2018-03-12 15:24:46 +01:00
committed by sys_ocldev
parent bc08ecdcea
commit 2119d5db08
10 changed files with 37 additions and 0 deletions

View File

@@ -167,6 +167,10 @@ uint64_t OsAgnosticMemoryManager::getMaxApplicationAddress() {
return MemoryConstants::max32BitAppAddress + static_cast<uint64_t>(is64bit) * (MemoryConstants::max64BitAppAddress - MemoryConstants::max32BitAppAddress);
}
uint64_t OsAgnosticMemoryManager::getInternalHeapBaseAddress() {
return this->allocator32Bit->getBase();
}
GraphicsAllocation *OsAgnosticMemoryManager::createGraphicsAllocation(OsHandleStorage &handleStorage, size_t hostPtrSize, const void *hostPtr) {
auto allocation = new MemoryAllocation(false, 0, const_cast<void *>(hostPtr), reinterpret_cast<uint64_t>(hostPtr), hostPtrSize, counter++);
allocation->fragmentsStorage = handleStorage;