1
0
mirror of https://github.com/m00natic/vlfi.git synced 2025-01-18 12:05:31 +00:00

Set vlf-tune-max with proper value in case RAM size is wrongly

determined.
This commit is contained in:
Andrey Kotlarski 2014-11-18 12:02:24 +02:00
parent f43ada1173
commit a7be7136be

View File

@ -56,10 +56,11 @@ but don't change batch size. If t, measure and change."
(* 1000 (string-to-number (substring free match-from (* 1000 (string-to-number (substring free match-from
(match-end 0)))))))) (match-end 0))))))))
(defcustom vlf-tune-max (let ((ram-size (vlf-tune-ram-size))) (defcustom vlf-tune-max (max (let ((ram-size (vlf-tune-ram-size)))
(if ram-size (if ram-size
(/ ram-size 20) (/ ram-size 20)
large-file-warning-threshold)) 0))
large-file-warning-threshold)
"Maximum batch size in bytes when auto tuning. "Maximum batch size in bytes when auto tuning.
Avoid increasing this after opening file with VLF." Avoid increasing this after opening file with VLF."
:group 'vlf :type 'integer) :group 'vlf :type 'integer)