aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-04-03 15:04:39 -0400
committerJack Lloyd <[email protected]>2017-04-03 15:04:39 -0400
commit5b7cbc8b6bd8ed7f9c0dce92c9ae118937c46c4b (patch)
treea62517746b213abd3f457d2732faa8f9f5f08567
parentf79e642ab8c09971968abdfe6990df6801711e1f (diff)
parent5430d174f2953d30b66c6aaaac1f311219bbc5de (diff)
Merge GH #930 Avoid throwing during destructor in memory mapped allocator
-rw-r--r--src/alloc/alloc_mmap/mmap_mem.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/alloc/alloc_mmap/mmap_mem.cpp b/src/alloc/alloc_mmap/mmap_mem.cpp
index 17c189e9b..85edbc474 100644
--- a/src/alloc/alloc_mmap/mmap_mem.cpp
+++ b/src/alloc/alloc_mmap/mmap_mem.cpp
@@ -73,8 +73,7 @@ void* MemoryMapping_Allocator::alloc_block(size_t n)
* will continue to exist until the mmap is unmapped from
* our address space upon deallocation (or process exit).
*/
- if(fd != -1 && ::close(fd) == -1)
- throw MemoryMapping_Failed("Could not close file");
+ fd != -1 && ::close(fd);
}
private:
int fd;