You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2017/12/04 01:09:34 UTC

[incubator-mxnet] 01/02: fix multiprocessing too many open files

This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch v1.0.0
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git

commit c63ca705f626663725e51ed1179c3c834177fa9c
Author: Junyuan Xie <er...@gmail.com>
AuthorDate: Sun Dec 3 17:09:02 2017 -0800

    fix multiprocessing too many open files
---
 src/storage/cpu_shared_storage_manager.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/storage/cpu_shared_storage_manager.h b/src/storage/cpu_shared_storage_manager.h
index d623cf2..9f0f2a3 100644
--- a/src/storage/cpu_shared_storage_manager.h
+++ b/src/storage/cpu_shared_storage_manager.h
@@ -139,6 +139,7 @@ void CPUSharedStorageManager::Alloc(Storage::Handle* handle) {
   ptr = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fid, 0);
   CHECK_NE(ptr, MAP_FAILED)
       << "Failed to map shared memory. mmap failed with error " << strerror(errno);
+  close(fid);
 #endif  // _WIN32
 
   if (is_new) {

-- 
To stop receiving notification emails like this one, please contact
"commits@mxnet.apache.org" <co...@mxnet.apache.org>.