Browse Source

Fix mem leak and recursive depth protection

tags/v1.5.1
zhaozhixuan 3 years ago
parent
commit
0ed42e96f7
2 changed files with 3 additions and 0 deletions
  1. +1
    -0
      ge/common/ge/tbe_plugin_manager.cc
  2. +2
    -0
      ge/hybrid/node_executor/task_context.cc

+ 1
- 0
ge/common/ge/tbe_plugin_manager.cc View File

@@ -156,6 +156,7 @@ void TBEPluginManager::FindParserSo(const string &path, vector<string> &file_lis
}
mmScandirFree(entries, ret);
temp_depth--;
return;
}

void TBEPluginManager::GetPluginSoFileList(const string &path, vector<string> &file_list, string &caffe_parser_path) {


+ 2
- 0
ge/hybrid/node_executor/task_context.cc View File

@@ -43,6 +43,7 @@ TaskContext::~TaskContext() {
output_tensor->Destroy();
}
}
ReleaseWorkspace();
}

void TaskContext::ReleaseWorkspace() {
@@ -50,6 +51,7 @@ void TaskContext::ReleaseWorkspace() {
for (auto ws_addr : workspaces_) {
execution_context_->allocator->Deallocate(ws_addr);
}
workspaces_.clear();
}

std::unique_ptr<TaskContext> TaskContext::Create(NodeState *node_state, SubgraphContext *subgraph_context) {


Loading…
Cancel
Save