From b1d82cd87ec8b52012ca2f773a60dd8a56e30655 Mon Sep 17 00:00:00 2001 From: Zbigniew Zdanowicz Date: Mon, 18 Mar 2019 14:53:06 +0100 Subject: [PATCH] Add Local memory to MemoryPool Change-Id: I908d4d99b53ed3ab959bbdc094cc1ae7bdfe2971 Signed-off-by: Zbigniew Zdanowicz --- runtime/memory_manager/memory_pool.h | 1 + unit_tests/memory_manager/memory_pool_tests.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime/memory_manager/memory_pool.h b/runtime/memory_manager/memory_pool.h index 96f03ad449..c9b26374cc 100644 --- a/runtime/memory_manager/memory_pool.h +++ b/runtime/memory_manager/memory_pool.h @@ -19,6 +19,7 @@ constexpr Type System64KBPages{2}; constexpr Type System4KBPagesWith32BitGpuAddressing{3}; constexpr Type System64KBPagesWith32BitGpuAddressing{4}; constexpr Type SystemCpuInaccessible{5}; +constexpr Type LocalMemory{6}; inline bool isSystemMemoryPool(Type pool) { return pool == System4KBPages || diff --git a/unit_tests/memory_manager/memory_pool_tests.cpp b/unit_tests/memory_manager/memory_pool_tests.cpp index c22ab57988..e8a674832b 100644 --- a/unit_tests/memory_manager/memory_pool_tests.cpp +++ b/unit_tests/memory_manager/memory_pool_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Intel Corporation + * Copyright (C) 2018-2019 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -25,7 +25,8 @@ TEST(MemoryPool, givenSystemMemoryPoolTypesWhenIsSystemMemoryPoolIsCalledThenTru TEST(MemoryPool, givenNonSystemMemoryPoolTypesWhenIsSystemMemoryPoolIsCalledThenFalseIsReturned) { MemoryPool::Type memoryTypes[] = {MemoryPool::MemoryNull, - MemoryPool::SystemCpuInaccessible}; + MemoryPool::SystemCpuInaccessible, + MemoryPool::LocalMemory}; for (size_t i = 0; i < arrayCount(memoryTypes); i++) { EXPECT_FALSE(MemoryPool::isSystemMemoryPool(memoryTypes[i]));