[vlc-devel] commit: mmap: Don't use mmap by default on OS X. (Derk-Jan Hartman )

git version control git at videolan.org
Tue Oct 7 16:12:14 CEST 2008


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Tue Oct  7 16:06:06 2008 +0200| [400b67361af4cbbf8a72acccad040a84c34b248d] | committer: Derk-Jan Hartman 

mmap: Don't use mmap by default on OS X.

It has little benefits in general, (esp. in our usecase) and huge disadvantages for files on network mounts.
"Basically, IOKit should be so fast and efficient, that there are few usecases left for mmap() on Darwin."

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=400b67361af4cbbf8a72acccad040a84c34b248d
---

 modules/access/mmap.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/access/mmap.c b/modules/access/mmap.c
index e49c041..0310e42 100644
--- a/modules/access/mmap.c
+++ b/modules/access/mmap.c
@@ -58,8 +58,11 @@ vlc_module_begin();
     set_capability ("access", 52);
     add_shortcut ("file");
     set_callbacks (Open, Close);
-
+#ifdef __APPLE__
+    add_bool ("file-mmap", false, NULL,
+#else
     add_bool ("file-mmap", true, NULL,
+#endif
               FILE_MMAP_TEXT, FILE_MMAP_LONGTEXT, true);
 vlc_module_end();
 




More information about the vlc-devel mailing list