From cb75a22e76e3ddfb5cf16c00057a5d138a855bb5 Mon Sep 17 00:00:00 2001 From: Robert Olson Date: Wed, 14 Sep 2022 13:41:51 -0500 Subject: [PATCH 1/2] Unmap region after use. --- src/mash/Sketch.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mash/Sketch.cpp b/src/mash/Sketch.cpp index a15d769..8f66d96 100644 --- a/src/mash/Sketch.cpp +++ b/src/mash/Sketch.cpp @@ -311,6 +311,7 @@ uint64_t Sketch::initParametersFromCapnp(const char * file) { setAlphabetFromString(parameters, alphabetNucleotide); } + munmap(fd, fileInfo.st_size); close(fd); try From aeca2e424b3980d9a61590ca13fdbc2fc38c3edf Mon Sep 17 00:00:00 2001 From: olsonanl Date: Wed, 14 Sep 2022 13:47:54 -0500 Subject: [PATCH 2/2] Fix parameter to munmap --- src/mash/Sketch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mash/Sketch.cpp b/src/mash/Sketch.cpp index 8f66d96..f040c23 100644 --- a/src/mash/Sketch.cpp +++ b/src/mash/Sketch.cpp @@ -311,7 +311,7 @@ uint64_t Sketch::initParametersFromCapnp(const char * file) { setAlphabetFromString(parameters, alphabetNucleotide); } - munmap(fd, fileInfo.st_size); + munmap(data, fileInfo.st_size); close(fd); try