From 876aaceb819451c78f9d213767ceb7e404567751 Mon Sep 17 00:00:00 2001 From: lianghao Date: Thu, 10 Jun 2021 09:48:37 +0800 Subject: [PATCH] MallocExMem --- ge/graph/load/model_manager/davinci_model.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ge/graph/load/model_manager/davinci_model.cc b/ge/graph/load/model_manager/davinci_model.cc index e69aa35f..65528650 100755 --- a/ge/graph/load/model_manager/davinci_model.cc +++ b/ge/graph/load/model_manager/davinci_model.cc @@ -4096,7 +4096,7 @@ uint8_t *DavinciModel::MallocFeatureMapMem(size_t data_size) { Status DavinciModel::MallocExMem() { char ge_static_mem_env[MMPA_MAX_PATH] = {0x00}; INT32 res_static_memory = mmGetEnv(kEnvGeuseStaticMemory, ge_static_mem_env, MMPA_MAX_PATH); - for (auto it : runtime_param_.memory_infos) { + for (auto &it : runtime_param_.memory_infos) { auto mem_size = it.second.memory_size; if (mem_size == 0) { continue; @@ -4167,7 +4167,7 @@ void DavinciModel::FreeFeatureMapMem() { void DavinciModel::FreeExMem() { char ge_static_mem_env[MMPA_MAX_PATH] = {0x00}; INT32 res_static_memory = mmGetEnv(kEnvGeuseStaticMemory, ge_static_mem_env, MMPA_MAX_PATH); - for (auto it : runtime_param_.memory_infos) { + for (auto &it : runtime_param_.memory_infos) { // free when session destory if ((kSessionScopeMemory & it.first) == kSessionScopeMemory) { continue;