Add debug variable to force default heap allocation size

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2022-02-09 12:33:43 +00:00
committed by Compute-Runtime-Automation
parent abd90308f3
commit b60d963ff5
7 changed files with 53 additions and 4 deletions

View File

@@ -21,6 +21,14 @@ using HeapContainer = std::vector<GraphicsAllocation *>;
constexpr size_t defaultHeapSize = 64 * KB;
inline size_t getDefaultHeapSize() {
auto defaultSize = defaultHeapSize;
if (DebugManager.flags.ForceDefaultHeapSize.get() != -1) {
defaultSize = DebugManager.flags.ForceDefaultHeapSize.get() * MemoryConstants::kiloByte;
}
return defaultSize;
}
class IndirectHeap : public LinearStream {
typedef LinearStream BaseClass;