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

git version control git at videolan.org
Wed Oct 8 20:41:34 CEST 2008


vlc | branch: 0.9-bugfix | Derk-Jan Hartman <hartman at videolan.org> | Tue Oct  7 16:06:06 2008 +0200| [67fef918d7d780d276332355cf9695867f2016c9] | 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."
(cherry picked from commit 400b67361af4cbbf8a72acccad040a84c34b248d)

Signed-off-by: Derk-Jan Hartman <hartman at videolan.org>

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

 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