You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/06/05 21:07:05 UTC

[GitHub] zhreshold commented on a change in pull request #11159: fix shared_storage free

zhreshold commented on a change in pull request #11159: fix shared_storage free
URL: https://github.com/apache/incubator-mxnet/pull/11159#discussion_r193222465
 
 

 ##########
 File path: src/storage/cpu_shared_storage_manager.h
 ##########
 @@ -215,12 +215,12 @@ void CPUSharedStorageManager::FreeImpl(const Storage::Handle& handle) {
       << "Failed to unmap shared memory. munmap failed with error "
       << strerror(errno);
 
+  if (count == 0) {
 #ifdef __linux__
-  CHECK_EQ(close(handle.shared_id), 0)
-      << "Failed to close shared memory. close failed with error "
-      << strerror(errno);
+    CHECK_EQ(close(handle.shared_id), 0)
 
 Review comment:
   You mean close on first FreeImpl and skip if already closed?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services