teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.4.2-no-large-mmap.patch

Paul Nasrat 2adf65
--- rpm-4.4.2/rpmdb/legacy.c.no_large_mmap	2006-01-10 11:25:28.000000000 +0000
Paul Nasrat 2adf65
+++ rpm-4.4.2/rpmdb/legacy.c	2006-01-10 11:25:31.000000000 +0000
Paul Nasrat 2adf65
@@ -167,6 +167,11 @@
Paul Nasrat 2adf65
 	goto exit;
Paul Nasrat 2adf65
     }
Paul Nasrat 2adf65
 
Paul Nasrat 2adf65
+    /* file to large (32 MB), do not mmap file */
Paul Nasrat 2adf65
+    if (fsize > (size_t) 32*1024*1024)
Paul Nasrat 2adf65
+      if (ut == URL_IS_PATH || ut == URL_IS_UNKNOWN)
Paul Nasrat 2adf65
+	ut = URL_IS_DASH; /* force fd io */
Paul Nasrat 2adf65
+
Paul Nasrat 2adf65
     switch(ut) {
Paul Nasrat 2adf65
     case URL_IS_PATH:
Paul Nasrat 2adf65
     case URL_IS_UNKNOWN: