summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-10-26 07:19:01 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-10-26 07:19:01 -0700
commit8934007f25600150cee7e6eda2816c9110a9dc69 (patch)
tree64ce250afe25af7882ab83f13251b3d03f633f52 /Src
parent11ca38c6d99192856d33254c504114d4ba8cd258 (diff)
downloadzsh-8934007f25600150cee7e6eda2816c9110a9dc69.tar.gz
zsh-8934007f25600150cee7e6eda2816c9110a9dc69.tar.xz
zsh-8934007f25600150cee7e6eda2816c9110a9dc69.zip
36956: revert 34451, mmap() is too slow on MacOS
Diffstat (limited to 'Src')
-rw-r--r--Src/mem.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Src/mem.c b/Src/mem.c
index 158ad9641..3138bb1d5 100644
--- a/Src/mem.c
+++ b/Src/mem.c
@@ -79,9 +79,16 @@
 
 #include <sys/mman.h>
 
+#if 0
+/*
+ * This change was designed to enable use of memory mapping on MacOS.
+ * However, performance tests indicate that MacOS mapped regions are
+ * significantly slower to allocate than memory from malloc().
+ */
 #if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
 #define MAP_ANONYMOUS MAP_ANON
 #endif
+#endif /* 0 */
 
 #if defined(MAP_ANONYMOUS) && defined(MAP_PRIVATE)