mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
[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:
committed by
sys_ocldev
parent
bc08ecdcea
commit
2119d5db08
@@ -462,6 +462,10 @@ uint64_t DrmMemoryManager::getMaxApplicationAddress() {
|
||||
return MemoryConstants::max32BitAppAddress + (uint64_t)is64bit * (MemoryConstants::max64BitAppAddress - MemoryConstants::max32BitAppAddress);
|
||||
}
|
||||
|
||||
uint64_t DrmMemoryManager::getInternalHeapBaseAddress() {
|
||||
return this->internal32bitAllocator->getBase();
|
||||
}
|
||||
|
||||
bool DrmMemoryManager::populateOsHandles(OsHandleStorage &handleStorage) {
|
||||
for (unsigned int i = 0; i < max_fragments_count; i++) {
|
||||
// If there is no fragment it means it already exists.
|
||||
|
||||
@@ -62,6 +62,7 @@ class DrmMemoryManager : public MemoryManager {
|
||||
|
||||
uint64_t getSystemSharedMemory() override;
|
||||
uint64_t getMaxApplicationAddress() override;
|
||||
uint64_t getInternalHeapBaseAddress() override;
|
||||
|
||||
bool populateOsHandles(OsHandleStorage &handleStorage) override;
|
||||
void cleanOsHandles(OsHandleStorage &handleStorage) override;
|
||||
|
||||
@@ -395,6 +395,10 @@ uint64_t WddmMemoryManager::getMaxApplicationAddress() {
|
||||
return wddm->getMaxApplicationAddress();
|
||||
}
|
||||
|
||||
uint64_t WddmMemoryManager::getInternalHeapBaseAddress() {
|
||||
return this->wddm->getGfxPartition().Heap32[1].Base;
|
||||
}
|
||||
|
||||
bool WddmMemoryManager::makeResidentResidencyAllocations(ResidencyContainer *allocationsForResidency) {
|
||||
|
||||
auto &residencyAllocations = allocationsForResidency ? *allocationsForResidency : this->residencyAllocations;
|
||||
|
||||
@@ -67,6 +67,7 @@ class WddmMemoryManager : public MemoryManager {
|
||||
|
||||
uint64_t getSystemSharedMemory() override;
|
||||
uint64_t getMaxApplicationAddress() override;
|
||||
uint64_t getInternalHeapBaseAddress() override;
|
||||
|
||||
static void APIENTRY trimCallback(_Inout_ D3DKMT_TRIMNOTIFICATION *trimNotification);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user