mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Add localMemorySupported member to MemoryManager
- extend constructor to take new flag - extend ExecutionEnvironment createMemoryManager with new flag - only OsAgnosticMemoryManager changes in this step Change-Id: I1dae4fd79fe28fd87e42b237600dc216c94b597e
This commit is contained in:
committed by
sys_ocldev
parent
05b93ef221
commit
cfa8035836
@@ -71,9 +71,12 @@ GraphicsAllocation *AllocationsList::detachAllocationImpl(GraphicsAllocation *,
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
MemoryManager::MemoryManager(bool enable64kbpages) : allocator32Bit(nullptr), enable64kbpages(enable64kbpages) {
|
||||
|
||||
MemoryManager::MemoryManager(bool enable64kbpages, bool enableLocalMemory) : allocator32Bit(nullptr), enable64kbpages(enable64kbpages),
|
||||
localMemorySupported(enableLocalMemory) {
|
||||
residencyAllocations.reserve(20);
|
||||
};
|
||||
|
||||
MemoryManager::~MemoryManager() {
|
||||
freeAllocationsList(-1, graphicsAllocations);
|
||||
freeAllocationsList(-1, allocationsForReuse);
|
||||
|
||||
@@ -108,7 +108,7 @@ class MemoryManager {
|
||||
RetryInNonDevicePool
|
||||
};
|
||||
|
||||
MemoryManager(bool enable64kbpages);
|
||||
MemoryManager(bool enable64kbpages, bool enableLocalMemory);
|
||||
|
||||
virtual ~MemoryManager();
|
||||
MOCKABLE_VIRTUAL void *allocateSystemMemory(size_t size, size_t alignment);
|
||||
@@ -271,6 +271,7 @@ class MemoryManager {
|
||||
std::unique_ptr<DeferredDeleter> deferredDeleter;
|
||||
bool asyncDeleterEnabled = false;
|
||||
bool enable64kbpages = false;
|
||||
bool localMemorySupported = false;
|
||||
std::vector<OsContext *> registeredOsContexts;
|
||||
};
|
||||
|
||||
|
||||
@@ -54,7 +54,8 @@ class OsAgnosticMemoryManager : public MemoryManager {
|
||||
using MemoryManager::allocateGraphicsMemory;
|
||||
using MemoryManager::createGraphicsAllocationFromSharedHandle;
|
||||
|
||||
OsAgnosticMemoryManager(bool enable64kbPages = false) : MemoryManager(enable64kbPages) {
|
||||
OsAgnosticMemoryManager() : OsAgnosticMemoryManager(false, false){};
|
||||
OsAgnosticMemoryManager(bool enable64kbPages, bool enableLocalMemory) : MemoryManager(enable64kbPages, enableLocalMemory) {
|
||||
uint64_t heap32Base = 0x80000000000ul;
|
||||
if (sizeof(uintptr_t) == 4) {
|
||||
heap32Base = 0x0;
|
||||
|
||||
Reference in New Issue
Block a user