Skip to content

Commit 7faf58a

Browse files
committed
don't munmap in numa in destructor
1 parent b956e4c commit 7faf58a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/llama-mmap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,8 @@ struct llama_mmap::impl {
496496
mapping.path.c_str(), strerror(errno));
497497
}
498498
}
499-
#endif
500-
#ifndef GGML_NUMA_MIRROR
499+
#else
500+
// Only unmap fragments if not using NUMA mirroring
501501
for (const auto & frag : mapped_fragments) {
502502
if (munmap((char *) addr + frag.first, frag.second - frag.first)) {
503503
LLAMA_LOG_WARN("warning: munmap failed: %s\n", strerror(errno));

0 commit comments

Comments
 (0)