[3/n] Internal 4GB allocator.

-Do not create allocator 32 bit with every DRM memory manager
-This is not needed for apps that do not use this.
-Add allocation of allocator to setForce32BitAddressing

Change-Id: I836b60f6b74eecf678cc9d56851797d0db176107
This commit is contained in:
Mrozek, Michal
2018-02-28 09:27:38 +01:00
committed by sys_ocldev
parent cb37fb97a3
commit 0b6acb4d7a
5 changed files with 45 additions and 3 deletions

View File

@@ -213,6 +213,13 @@ std::unique_ptr<GraphicsAllocation> MemoryManager::obtainReusableAllocation(size
return allocation;
}
void MemoryManager::setForce32BitAllocations(bool newValue) {
if (newValue && !this->allocator32Bit) {
this->allocator32Bit.reset(new Allocator32bit);
}
force32bitAllocations = newValue;
}
void MemoryManager::applyCommonCleanup() {
if (this->paddingAllocation) {
this->freeGraphicsMemory(this->paddingAllocation);