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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to