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 20:50:15 UTC

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

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

 ##########
 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:
   if(count==0) shouldnt' be moved. Skip close if shared_id == -1 instead

----------------------------------------------------------------
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