mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
With flag enabled, when app calls freeSVMAlloc on device usm allocation, don't free it immediately but save it, and try to use it on subsequent allocations. This allocation cache will be trimmed if an allocation fails. Related-To: NEO-6893 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
22 lines
615 B
C++
22 lines
615 B
C++
/*
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "shared/source/memory_manager/unified_memory_manager.h"
|
|
namespace NEO {
|
|
struct MockSVMAllocsManager : public SVMAllocsManager {
|
|
public:
|
|
using SVMAllocsManager::memoryManager;
|
|
using SVMAllocsManager::multiOsContextSupport;
|
|
using SVMAllocsManager::SVMAllocs;
|
|
using SVMAllocsManager::SVMAllocsManager;
|
|
using SVMAllocsManager::svmMapOperations;
|
|
using SVMAllocsManager::usmDeviceAllocationsCache;
|
|
using SVMAllocsManager::usmDeviceAllocationsCacheEnabled;
|
|
};
|
|
} // namespace NEO
|