mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Calculate a maxOsContextCount variable
Change-Id: I7b2f7733be74abf4ae299396d616b249b67de58e Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
1021d8c6d2
commit
eac48002ab
@@ -30,6 +30,8 @@
|
||||
#include <algorithm>
|
||||
|
||||
namespace NEO {
|
||||
uint32_t MemoryManager::maxOsContextCount = 0u;
|
||||
|
||||
MemoryManager::MemoryManager(ExecutionEnvironment &executionEnvironment) : executionEnvironment(executionEnvironment), hostPtrManager(std::make_unique<HostPtrManager>()),
|
||||
multiContextResourceDestructor(std::make_unique<DeferredDeleter>()) {
|
||||
auto hwInfo = executionEnvironment.getHardwareInfo();
|
||||
|
||||
@@ -158,6 +158,8 @@ class MemoryManager {
|
||||
void *getReservedMemory(size_t size, size_t alignment);
|
||||
GfxPartition *getGfxPartition(uint32_t rootDeviceIndex) { return gfxPartitions.at(rootDeviceIndex).get(); }
|
||||
|
||||
static uint32_t maxOsContextCount;
|
||||
|
||||
protected:
|
||||
struct AllocationData {
|
||||
union {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "core/helpers/options.h"
|
||||
#include "core/helpers/ptr_math.h"
|
||||
#include "core/memory_manager/host_ptr_manager.h"
|
||||
#include "core/memory_manager/residency.h"
|
||||
#include "core/os_interface/os_memory.h"
|
||||
#include "runtime/aub/aub_center.h"
|
||||
#include "runtime/execution_environment/execution_environment.h"
|
||||
@@ -188,7 +189,7 @@ void OsAgnosticMemoryManager::removeAllocationFromHostPtrManager(GraphicsAllocat
|
||||
}
|
||||
|
||||
void OsAgnosticMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation) {
|
||||
for (auto handleId = 0u; handleId < maxHandleCount; handleId++) {
|
||||
for (auto handleId = 0u; handleId < EngineLimits::maxHandleCount; handleId++) {
|
||||
delete gfxAllocation->getGmm(handleId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user